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
Post a Comment