As far as I understand Angularjs services are created by passing in a Contructor function:
app.service('serviceName', function(){
this.var1 = 'foo';
this.method1 = function(){
}
});
Angular runs this function with the new operator.
I was going through this service, and i don't see any "this" insider
https://github.com/shreya5/angular-facebook-utils/blob/master/src/scripts/facebookUser.js
Infact this function returns deferred.promise
Can someone shed some light on what's going on here ?