Joined November 2012
·

Roy Peled

U FED Team
·
Earth
·
·

Posted to RESTful $resource in AngularJS over 1 year ago

I really didn't like the fact that restangular depends on lodash, and that it's not pre-configurable.
So I tried to create my own module which extends Angular's resource object to support nested models:
https://github.com/roypeled/angular-nested-resource

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

Angular's apply is able to run without a function as a parameter, so it will propagate all previous changes to the UI.
I purpose this update:
$scope.safeApply = function(fn) {
var phase = this.$root.$$phase;
if(phase == '$apply' || phase == '$digest') {
if(fn)
fn();
} else {
this.$apply(fn);
}
};

Achievements
18 Karma
0 Total ProTip Views
Interests & Skills