Hello, 
i have this thing in my *code* that i include *$q* with *$http* .. 

*authenticate : function(url, user){*
*        var defer = $q.defer();*
*        //console.log('here');*
*        return $http.post(url, user).then(function (response) {*
*          if (response.data) {*
*            console.log(response);*
*            defer.resolve(response);*
*          } else{*
*            defer.resolve(response.data.errMessage);*
*          }*
*          return defer.promise;*
*        });*

*      }*

 and it works normally and i know that* $http* resolve automatically a 
*promise* .. so is the usage of *$q promise* here is needed ?

-- 
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to