meteor - How to track Slingshot upload progress change without using setInterval? -


i using meteor-slingshot upload file. want set progress bar percentage when changes.

this how now.

{{percentage}}  percentage: number; uploadbutton() {   // first start upload   // ...    // track progress   setinterval(() => {     this.percentage = uploader.progress();  // api uploader.progress() returns number   }, 1000); } 

is there smart way using rxjs or else track number change without using setinterval?

thanks

uploader.progress() reactive source. end using tracker.

this.autorun(() => this.percentage = uploader.progress()); 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -