2
我有一个页面上的多个下载按钮,为每个下载进度条:动态变量
<progress-bar *ngIf="progressbar" [progress]="loadProgress_id1"></progress-bar>
<progress-bar *ngIf="progressbar" [progress]="loadProgress_id2"></progress-bar>
...
我有一个设置进度的功能:
setpercentage(perc,id) {
this.loadProgress_+id = Math.round(perc); // --> how could I do this?
this.ref.detectChanges();
}
我试过的(上面的)不起作用。我怎么能做到这一点?或者我应该使用不同的方法?
'此[ 'loadProgress' + ID] =' – yurzui