I'm somewhat new to angular and have come across a very weird problem, I'm sure others have too.
Let's say that this is the code for my button:
<button type="submit" ng-click="submit(something)" id="coolButton"
ng-disabled="type === 0 || code === ''"
>Check-In</button>
So, basically if either type is 0 or code is nothing (no text), then this button will be disabled.
Now's here where my problem starts: If I load the page with type = 0 and code = '', then sure enough it's disabled. If, I change both of these values then of course the button will be enabled.
However, if I change the values back to 0 and '', then the button won't become disabled again. I know for a fact that the values are in fact 0 and '' as I've printed their values out on the page.
What could be causing ng-disabled to not run the expression again?
We shouldn't do this, because it will make the button enabled on Chrome/Firefox but not on IE8 and older IEsdisabled="{{expression}}", butng-disabledis good. The same comment applys for ngSrc, ngClass, etc. @Daniel Jamrozik, this should work so please provide an actual code snippet or jsfiddle that reproduces the issue.