【发布时间】:2022-01-18 16:39:25
【问题描述】:
我已经被困了一段时间了。确认 this.progressBarValue 更改为 true。但是没有显示进度条。有人可以提前帮助我吗?
一些组件.html
<div class="progressBar">
<mat-progress-bar class="fileProgress" mode="indeterminate" *ngIf="progressBarValue">
</mat-progress-bar>
</div>
一些组件.ts
confirmConversion() {
this.progressBarValue = true;
console.log(this.progressBarValue)
var filepath = this.filePath;
var fileextension = this.settingsExtension;
new Promise((resolve, reject) => {
window.ConvertMedia(filepath, fileextension, resolve, reject);
}).then((message) => {
console.log(message);
});}
如果我不调用 Cordova API,它正在工作(显示进度条)。
我也尝试过使用下面给出的一些方法,但没有奏效。
this.zone.run(() => this.progressBarValue = true)
console.log(this.progressBarValue)
this.changeDetector.detectChanges() & this.changeDetector.markForCheck()
注意:如果我在里面更新 this.progressBar = true 会显示 ProgressBar
.then((message) => {console.log(message);});
【问题讨论】:
标签: android angular cordova cordova-plugins