当我以角度加载图像时如何显示微调器? 我不想逐张加载图片
我尝试过这种方法,但没有成功:
imageLoader = false; loading: boolean = true
onLoad() {
this.loading = false;
}
<img *ngIf="loading" src="/assets/loading.gif" alt="loading" />
<img [hidden]="loading" (load)="onLoad()" src="{{ source }}" />