Thanks a lot Sander.

On Wednesday, 23 December 2015 19:52:26 UTC+5:30, Kumar Ranjan wrote:
>
> Wanted to convert following service to Angular 2 Service. I am using 
> google api here. The main problem I am getting is to returning the Promise 
> as its not similar as Angular 1.x.
>
> getLoginStatus: function () {
>       var deferred = $q.defer();
>       gapi.auth.authorize({client_id: dataStore.getData('CLIENT_ID'), scope: 
> dataStore.getData('SCOPES'), immediate: true},function(response){
>       var res = {};
>            res = response;
>            deferred.resolve(res);
>       });
>       return deferred.promise;
>  }
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to