Progressbar waiting for Meteor Method call?

I would like Progressbar waiting for Meteor Method call?
I base on Vue. Please help me

You probably need to make 2 method calls. 1 to get the total results, and then loop the other to get each result. Something like this:

fetchedResults = 0
progress = 0
results = []

Meteor.call 'getTotalResults', (err, totalResults) -> 
   # e.g. returns 100 results

   for i in [1..totalResults]
      # now request each result. Mind that this is async.
      Meteor.call 'getResult', (err, result) -> 
          results.push result
          fetchedResults++
          progress = (fetchedResults / totalResults) * 100
 

Hope this helps.

Wow, it seem difficult to understand :smile: