AngularJS: Empty - latest CI build
HTML
<script src="http://ci.angularjs.org/job/angular.js-angular-master/ws/build/angular.js"></script>
<a ng:click="object.id = object.id+1">increment</a>
JavaScript
function Main($scope) {
$scope.object = {id: 0};
// this watcher is fired always
$scope.$watch('object', function(object) {
console.log('The object has changed.', object.id);
}, true);
var flag = false;
$scope.$watch('object', function(object) {
if (flag) {
flag = false;
return;
}
console.log('Special watcher is changing the object', object.id);
object.id++;
// ignore next time
flag = true;
}, true);
}