![](/img/trans.png)
[英]Angular: Mat-Progress-Spinner does not recognize indeterminate mode when updating from Angular 9/10 to 13
[英]Angular Mat Progress Spinner Module not updating value
由於某種原因,這件事不起作用。 我可以使用不確定模式。 它會顯示並旋轉。 但是我需要向用戶展示其在流程中所處位置的價值。
這是我的HTML
<mat-progress-spinner *ngIf='ShowLoader'
class="progressSpinner"
[color]="myCustomColor"
[value]="myCustomValue"
[mode]="mode">
</mat-progress-spinner>
我的打字稿
myCustomColor = 'primary';
mode = 'determinate';
myCustomValue: number = 0;
然后在我的頁面加載功能上作為測試示例
pageload() {
this.ShowLoader = true;
for (let i = 0; i < 1000; i++) {
const num = ((i / 1000) * 100);
setTimeout(() => {
this.myCustomValue = num;
}, 500);
}
}
擺脫[模式]。 使用以下內容:
<mat-progress-spinner *ngIf='ShowLoader'
class="progressSpinner"
[color]="myCustomColor"
[value]="myCustomValue">
</mat-progress-spinner>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.