Joined July 2012

Tom Roggero

Open Standards Developer at R/GA

Posted to 'Safe' $apply in Angular.JS over 1 year ago

There could be a race condition in here... What if my function execution ends after the current .$apply has called $diggest in order to refresh the scope? This is the case when we call .safeApply when something is already happening on .$apply, as you can see on the conditional, it will just simply execute the function.

Posted to Get nearest entity over 1 year ago

Sin loop:

var that = this;
return Math.min.apply( () {
    return this.distanceTo(that);
149 Karma
4,652 Total ProTip Views