I got a declined Not An Answer (NAA) flag on this answer: AngularJS : Clear $watch
See if the Demo here helps, $watch service is used To set a handler that will be invoked when the value reffered to by the expression http://www.tutorialspark.com/AngularJS/AngularJS_Updating_Scopes.php
The original question is this:
I have a watch function at my Angular Js application.
$scope.$watch('quartzCrystal', function () { ... }
However after some condition(in my example changing the page at my single page application) I want to stop that watch (as like clearing timeout)
How can I do that?
Obviously, the person asking the question knows what the $watch
service does. It does not make any effort to answer the question that is asked. It's the equivalent of "How do I dunk a basketball?" Answer: "A basketball is a ball used in the sport of basketball."
This had a unanimous four Recommend Deletion in the Low Quality Posts Queue when a moderator declined the flag.
This is NAA, and I will be voting to delete it tomorrow when I get my votes back if it's not already gone via the meta effect.