>Don't get it. 'disable-action="disableClearMessage" ' is setting the value to a string. How does it get to a bool ?
>
>
>>
>>However, the button is not disabled and I can click on it just fine and the click event works. It may be a minor problem since the only reason I want to disable the button if there is nothing to clear (the message is empty anyway).
disableClearMessage is a variable I define in the controller's code. So, I set it to true or false in the code.
In the directive it was originally
ng-disabled = " disableAction"
and it didn't work (e.g. it was disableAction in the resulting HTML).
So, I changed last line of the directive to read as
ng-disabled = "{{ disableAction}} "
so now it probably evaluates the value of the disableClearMessage and sets it to true, so the ng-disabled = "true" now.
The strange thing is that it does work correctly in the New mode, but in the Edit mode the exactly same HTML code doesn't work.
If it's not broken, fix it until it is.
My Blog