Thanks Aaron! That was helpful.

On Wed, Apr 30, 2014 at 10:57 AM, Aaron Siladi <[email protected]> wrote:

> The Angular way would be to create a service which returns a $resource.
>
> $resource a higher level abstraction on $http for REST interfaces
> https://docs.angularjs.org/api/ngResource/service/$resource
>
> As mentioned by others the benefit are the following:
> 1.  You can reuse it in many controllers
> 2.  More ease of unit testing
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/dJ6xfEk93s0/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>



-- 
Regards,
Rajesh

-- 
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