Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IIF in JavaScript
Message
 
 
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01605133
Message ID:
01605186
Views:
26
>>>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}}"
>
Let me try that.

I still don't understand why we can set

ng-disabled = "variableInScope" and it would work correctly.

So, how should I adjust my template? Should I go back to

ng-disabled = "disableAction" ?

BTW, by controller I mean the controller.js file, not the .cs controller.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform