Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF in JavaScript
Message
 
 
À
06/08/2014 12:52:41
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01605133
Message ID:
01605240
Vues:
33
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform