Html 数据src与ngIf成角度
我上传图像的角度。但是当model.logoUrl为空时,链接代码不会显示200*200的演示图像Html 数据src与ngIf成角度,html,angular,Html,Angular,我上传图像的角度。但是当model.logoUrl为空时,链接代码不会显示200*200的演示图像 <div id="carousel-match-generic" *ngIf="statusType=='Edit'" [ngStyle]="{width: '210px'}"> <div class="fileupload admin-form fileupload-new" data-provides="fileupload"> <div class="f
<div id="carousel-match-generic" *ngIf="statusType=='Edit'" [ngStyle]="{width: '210px'}">
<div class="fileupload admin-form fileupload-new" data-provides="fileupload">
<div class="fileupload-preview thumbnail mb15">
<img *ngIf="model.logoUrl" src="{{model.logoUrl}}" width="200" alt="holder">
<img *ngIf="!model.logoUrl" data-src="holder.js/200x200" alt="holder">
</div>
<span class="button btn-system btn-file btn-block ph5">
<span *ngIf="!model.logoUrl">上传LOGO</span>
<span *ngIf="model.logoUrl">修改LOGO</span>
<input type="file" name="logoUrl" id="inputImage" (change)="fileChanged($event)">
</span>
</div>
上传标志
修改标志
结果是
<img _ngcontent-c0="" alt="holder" data-src="holder.js/200x200">
问题出在哪里?我会说,用src
代替data src