Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor JS Progresss Bar

Tags:

meteor

I'm working on a meteor application in which User will click on a button, then application internally makes the api call will append the result to the html. During the api call I want to show the progress bar to user, how can make it in meteor.

-thanks.

like image 518
MSR Avatar asked Jul 16 '26 02:07

MSR


1 Answers

Adding some more information about what exactly your needs are for the progress bar may help.

In most cases, I use: https://github.com/zhouzhuojie/meteor-nprogress. You can see a demo here.

In your case, the usage would be something like:

'click #[buttonId]':function(){
   NProgress.start(); //this starts the progress bar

   Meteor.call('[method name]', function(err, res){
      if(res){
         //Do whatever you want with the result
         NProgress.end(); //this completes the progress bar
      }
   });
}
like image 107
kartikshastri Avatar answered Jul 18 '26 05:07

kartikshastri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!