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:
01611414
Vues:
46
This message has been marked as the solution to the initial question of the thread.
>
>noDirtyCheck is a directive. I add data in front to avoid the warnings from the VS.

Instead of

data-no:dirty-check

I would have expected to see:

data-no="dirty-check"

>BTW, I was wrong saying that ng-change is not firing. I had a breakpoint on the wrong line. It does fire but in the code the $scope.showFinalized is always false regardless on what state the checkbox is.

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).
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform