javascript - ng-disabled doesn't appear to work -
i'm trying conditionally enable/disable save button using ng-disabled:
<button type="button" title="save changes" ng-click="onsavechanges()" ng-disabled="{{!data.modified}}">save</button>
i have $scope.data.modified variable changes true when data has been modified. regardless whether true or false, save button enabled. element inspection reveals value of ng-disabled toggles between "true" , "false" expect button enabled.
when using angular js attribute (like ng-show, ng-hide, ng-disabled) should without snake notation ex.ng-disabled="!data.modified"
. other ordinary attribute class, id have use snake notation. ex. class={{avaribaleincontrollerscope}}
Comments
Post a Comment