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:
01605240
Views:
32
>Glad you got it working. I owe you an apology - seems that binding a property in an isolated scope of a directive is a special case.
>The correct syntax is :
>The attribute value on the markup for the directive should be the *name* of the property in the scope where it is used.
>In the isolated scope you bind to the attribute name (converting snake to camel)
>So:
Controller on the element where the directive is used:
>$scope.disableClearMessage = true;
>// Directive attribute:
>disable-action = "disableClearMessage"
>// Directive scope:
>disableAction : '='
>//Directive template:
>ng-disabled = "{{disableAction}}"
>
>Hope that clears it up :-}

In my case the template is
template: '<a ng-click="click()" ng-disabled="disableAction" >{{ linkText }}</a>'
Yet is seems to be working correctly - it is enabled when it should be enabled and disabled when it should be disabled.
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