如果单击取消按钮,我想删除文件名。 我的代码是:
<div layout="row" class="noPadding">
<p class="md-body-1 bold underline">Download CSV</p>
<md-button class="md-raised" ng-click="showBulkEntries()">
<label for="file-upload-input-{{themeObj.name}}" style="color:green">Browse</label>
</md-button>
<input type = "file" id="file-upload-input-{{themeObj.name}}" file-model = "mcqEditCtrl.fileUploadObj['{{themeObj.name}}'].csvUploadFile" ng-hide="inputHide=true" ngf-pattern="'*.csv'" accept="application/csv" multiple/>
<label class="md-body-1">{{mcqEditCtrl.fileUploadObj[themeObj.name].csvUploadFile.name}}</label>
<md-button flex-offset="5" class="md-hue-3 md-raised" ng-click="mcqEditCtrl.uploadFile(themeObj)">Preview/Upload</md-button>
</div>