This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
$scope.$watch doesn't see DOM changes done in current $digest cycle, but sees them in next cycle #10522
Closed
Description
Specifically it doesn't see changes made for class attribute by ng-class directive.
The issue occures for AngularJS v1.3.7, for Angular 1.2.26 is ok.
Below is easy to analyse fure Angular plunker example, with $watch based on function checking class attribute changes in each digest cycle (or more times per digest).
Steps to reproduce the issue:
- click checkbox to apply "redClass" style on Foo Paragraph (it becomes red)
- click "No Operation" button to poke next digest cycle and observe that $watch now "sees" applied redClass
- switch to Angular 1.2.26 to see the difference in behaviour
Metadata
Metadata
Assignees
Labels
No labels