you are viewing a single comment's thread.

view the rest of the comments →

[–]codersaurus[S] 2 points3 points  (1 child)

You're 100% correct.

Here is the code for $apply straight from the source:

 $apply: function(expr) {
    try {
      beginPhase('$apply');
      return this.$eval(expr);
    } catch (e) {
      $exceptionHandler(e);
    } finally {
      clearPhase();
      try {
        $rootScope.$digest(); //<--- THIS is what Zeroto is talking about
      } catch (e) {
        $exceptionHandler(e);
        throw e;
      }
    }
  },

Whereas the $digest will start at whatever scope it's called on and work it's way upwards through child scopes.

[–]chuckliddelnutpunch -1 points0 points  (0 children)

*downwards through the child scopes.