code: function(expr) {
          // if we are outside of an $digest loop and this is the first time we are scheduling async
          // task also schedule async auto-flush
          if (!$rootScope.$$phase && !asyncQueue.length) {
            $browser.defer(function() {
              if (asyncQueue.length) {
                $rootScope.$digest();
              }
            });
          }
  
          asyncQueue.push({scope: this, expression: expr});
        }
docs: @ngdoc method
  @name $rootScope.Scope#$evalAsync
  @kind function
  
  @description
  Executes the expression on the current scope at a later point in time.
  
  The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only
  that:
  
  - it will execute after the function that scheduled the evaluation (preferably before DOM
  rendering).
  - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after
  `expression` execution.
  
  Any exceptions from the execution of the expression are forwarded to the
  {@link ng.$exceptionHandler $exceptionHandler} service.
  
  __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle
  will be scheduled. However, it is encouraged to always call code that changes the model
  from within an `$apply` call. That includes code evaluated via `$evalAsync`.
  
  @param {(string|function())=} expression An angular expression to be executed.
  
  - `string`: execute using the rules as defined in {@link guide/expression expression}.
  - `function(scope)`: execute the function with the current `scope` parameter.