如果用户选择选定的值(保存的值),如何禁用保存按钮?

时间:2019-04-02 08:25:25

标签: angularjs drop-down-menu selectedvalue

当用户选择之前保存的值时,

禁用“保存”按钮;如果选择了任何新值,则将启用“保存”按钮!

<select ng-if='deviceList.stb.valueSet != null'  
        ng-model="$parent.selectedValue[deviceList.stb.attributeColumn]"
        ng-options="obj.modelSerial as obj.modelSerial for obj in deviceList.cpe | cpeFilter: deviceList.stb: selectedValue[deviceDetailsList[deviceDetailsList.indexOf(deviceList)-1].stb.attributeColumn] "
        ng-change="updateDeviceRequest(deviceList.stb.attributeColumn.toLowerCase(),selectedValue[deviceList.stb.attributeColumn]);updateDeviceDetails(deviceList.stb,selectedValue[deviceList.stb.attributeColumn]);"
        ng-disabled="isComplete || (isSupervisor && !(isSupervisorTask))" name="deviceValueDropdown">
        <option ng-if=" selectedValue[deviceList.stb.attributeColumn] === null" value="">{{"views.dropDown.select" | translate}}</option>
</select>

0 个答案:

没有答案