【发布时间】:2019-07-19 02:28:15
【问题描述】:
我想在 Angular 应用程序中使用微调器。我找到了一个叫做 ngx-spinner 的。然而,没有足够的例子来说明它的实际使用。我想在我的 http 请求中使用它。如何正确显示隐藏/显示微调器?
public getCars(){
this.spinner.show();
this.appService.getCars().subscribe(
car => {
this.carList=car;
for (let i = 0; i < this.carList.length; i++) {
let make = this.carList[i].make;
}
},
);
this.spinner.hide();
}
我安装了 ngx-spinner 并正确导入。该库正在运行,但我无法在我的 http 请求中正确使用它。 欢迎任何帮助。
【问题讨论】:
标签: angular typescript http promise spinner