不确定的进度条无法正常工作
Indeterminate progress bar not working properly
我正在使用 MatProgressBarModule 在卡片页脚的末尾添加线性不确定状态栏。下面是我的代码 -
<mat-card-footer>
<ng-content select="dashboard-card-footer"></ng-content>
<section class="example-section">
<mat-progress-bar [mode]="indeterminate" value="20" bufferValue ="75">
</mat-progress-bar>
</section>
</mat-card-footer>
它在屏幕上显示为确定的状态栏。我也尝试过不同的模式,即查询、缓冲区。但它只能作为一个确定的进度条。
你不应该使用 []
(当你想将值与任何 object/variable 绑定时应该使用它)来定义模式,因为 indeterminate
不是组件变量而只是字符串.也不需要 value
& bufferValue
。将您的代码修改为:
<mat-card-footer>
<ng-content select="dashboard-card-footer"></ng-content>
<section class="example-section">
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</section>
</mat-card-footer>
尝试检查,也许您有导入:NoopAnimationsModule,因为它会禁用您应用的所有动画)
我正在使用 MatProgressBarModule 在卡片页脚的末尾添加线性不确定状态栏。下面是我的代码 -
<mat-card-footer>
<ng-content select="dashboard-card-footer"></ng-content>
<section class="example-section">
<mat-progress-bar [mode]="indeterminate" value="20" bufferValue ="75">
</mat-progress-bar>
</section>
</mat-card-footer>
它在屏幕上显示为确定的状态栏。我也尝试过不同的模式,即查询、缓冲区。但它只能作为一个确定的进度条。
你不应该使用 []
(当你想将值与任何 object/variable 绑定时应该使用它)来定义模式,因为 indeterminate
不是组件变量而只是字符串.也不需要 value
& bufferValue
。将您的代码修改为:
<mat-card-footer>
<ng-content select="dashboard-card-footer"></ng-content>
<section class="example-section">
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</section>
</mat-card-footer>
尝试检查,也许您有导入:NoopAnimationsModule,因为它会禁用您应用的所有动画)