我想使用ng文件上传显示图像预览,它显示图像预览,但当我再次单击浏览按钮时图像预览消失。但我希望能够再次单击该浏览按钮后看到图像预览
<div ng-change="chkFileExt(item.textImage)" class="button file-btn btn btn-sm" ngf-select ng-click="ediImage=true;linkItemImage($index)" ng-model="item.textImage" name="dataFile_{{key}}" ngf-pattern="'.png,.svg,.jpg'" ngf-accept="'image/*'" ngf-max-size="2MB" ngf-resize="{width: 100, height: 100}">Browse & Upload</div>
图像预览代码:
<img style="width: 100%; height: 55px; padding: 0px;" ngf-src="item.textImage" class="img-responsive cls_uploaded_img img-thumbnail" />