Evaluates the expr expression in the context of the current scope during each eval cycle.
expr
eval cycle
var scope = angular.scope(); scope.counter = 0; scope.$onEval('counter = counter + 1'); expect(scope.counter).toEqual(0); scope.$eval(); expect(scope.counter).toEqual(1);