Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
$scope.$watch stopped firing
Message
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01611409
Message ID:
01611417
Vues:
26
>I don't know if this is the case or not, but I've gotten in the habit of adding an object into my scope and then adding the properties to it instead. Angular gets weird with scope inheritance and stuff can sometimes just not work.
>
>Ex.
>
>In the controller:
>
>$scope.data = { showFinalized : false };
>
>Then ng-bind to "data.showFinalized".
>
>(there isn't anything special about the name "data" - you could name this var anything you'd like).

Thanks, Paul. Switching to use an object's property instead of direct $scope property solved this problem.
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