第3行是我想要的,但还没有工作,有什么意见吗?
<input name="myFile" id="myFile" type="file" accept=".deb" ng-if="platform === 'ubuntu'" vw-file="newObject.newImage" ng-disabled="!newObject.edit">
<input name="myFile" id="myFile" type="file" accept=".iso" ng-if="platform === 'redhat'" vw-file="newObject.newImage" ng-disabled="!newObject.edit">
<!-- input name="myFile" id="myFile" type="file" accept={{(platform === "ubuntu") ? ".deb" : ".iso"}} vw-file="newObject.newImage" ng-disabled="!newObject.edit" -->
答案 0 :(得分:0)
第3行应如下
<input
name="myFile"
id="myFile"
type="file"
accept="{{(platform === 'ubuntu') ? '.deb' : '.iso'}}"
vw-file="newObject.newImage"
ng-disabled="!newObject.edit">