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.
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
}
});
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With