>>ng-disabled = "variableInScope" and it would work correctly.
>
>I'd guess it's because the string always casts to Boolean true (as in previous post re: ternary operator). It's certainly not binding to the scope variable.
>
I think it does work correctly and bind to the variable. The ng-show clearly binds to the variable.
Anyway, I tried this code
<data-confirm:button class="btn btn-default" confirm-title="Confirm Clear"
confirm-message="'Are you sure you want to clear all e-messages?'"
ok-label="Yes"
cancel-label="No"
link-text="Clear E-Messages"
disable-action ="{{ disableClearMessage }}"
ok-action="clearEMessage()"></data-confirm:button>
and got this error after I opened Google Chrome Developer's tools:
Error: [$parse:syntax] Syntax Error: Token 'disableClearMessage' is unexpected, expecting [:] at column 4 of the expression [{{ disableClearMessage }}] starting at [disableClearMessage }}].
So, it doesn't work here this way.
>>So, how should I adjust my template? Should I go back to
>>
>>ng-disabled = "disableAction" ?
>
>No. I think you should back up and make sure you understand scope bindings :-}
>
>>BTW, by controller I mean the controller.js file, not the .cs controller.
>
>I know.
If it's not broken, fix it until it is.
My Blog