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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -