AngularJS : Clear $watch
问题 I have a watch function in my AngularJS 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? 回答1: $watch returns a deregistration function. Calling it would deregister the $watcher . var listener = $scope.$watch("quartz", function () {}); // ... listener(); // Would clear the watch 回答2: scope.$watch returns a