Is it possible to set a value on a $watched scope property that doesn't trigger the $watch callback?

angularjs

Solution

You could use setTimeout to wait for Angular's digest cycle to complete and then run your code:

setTimeout(function(){
    $scope.count = 1;
},0)

This way the angular code finishes running, checks for changes and then the property is set without getting Angular involved.

Problem

Is it possible to set `count` and not trigger the `$watch` callback? ``` $scope.count=1; $scope.$watch('count',function(){...}); ``` Thanks.

Original source