// .html <img [src]="nzSrc" *ngIf="nzSrc && hasSrc" (error)="imgError()"/> // .ts imgError(): void { // 没有图片时会触发 }
img 标签上的src 链接图片不存在时 怎么处理
原文:https://www.cnblogs.com/flxy-1028/p/10951375.html