Suppose there is a function by clicking on which in $ scope something changes, for example:
$scope.update = function(newName) { $scope.name = newName; } <button ng-click=update('blabla')>Test</button> How does the angular learn whether there were changes in $ scope and start digest? $ scope is a regular object, it is not a function of the type:
fn(newName) { $scope.name = newName; $digest(); // обход watcher-ов... как он добавляет эту функцию? точно не знаю как она называется... } Or an angular when clicking on ng-click automatically starts a function that bypasses all watchers, even if there was no change in $ scope?