angular.scope.$onEval

Work in Progress This page is currently being revised. It might be incomplete or contain inaccuracies.

Description

Evaluates the expr expression in the context of the current scope during each eval cycle.

Example

         var scope = angular.scope();
         scope.counter = 0;
         scope.$onEval('counter = counter + 1');
         expect(scope.counter).toEqual(0);
         scope.$eval();
         expect(scope.counter).toEqual(1);
       

Usage

angular.scope.$onEval(priority, expr[, exceptionHandler]);

Parameters