How do I use $scope.$watch and $scope.$apply in AngularJS?
Asked 07 September, 2021
Viewed 2.9K times
  • 52
Votes

I don't understand how to use $scope.$watch and $scope.$apply. The official documentation isn't helpful.

What I don't understand specifically:

  • Are they connected to the DOM?
  • How can I update DOM changes to the model?
  • What is the connection point between them?

I tried this tutorial, but it takes the understanding of $watch and $apply for granted.

What do $apply and $watch do, and how do I use them appropriately?

6 Answer