Joined July 2012
·

Tom Roggero

Open Standards Developer at R/GA
·
Argentina
·
·
·

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(ig.game.entities.map(function () {
    return this.distanceTo(that);
}));
Achievements
149 Karma
4,652 Total ProTip Views