Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IIF in JavaScript
Message
From
05/08/2014 13:30:01
 
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01605133
Message ID:
01605185
Views:
30
>>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.

You mean it is in the controller scope? As before you are assigning a string - you need to reference it in the scope:
disable-action="{{disableClearMessage}}"
It's exactly the same problem as you describe below.....

>
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform