That's exactly what I was thinking would work best for REST-heavy SPAs. 
 Good to know I was on the right track.  Thanks Sander.

On Thursday, September 29, 2016 at 12:59:06 PM UTC-5, Sander Elias wrote:
>
> Hi Stephen,
>
> What I did was create a rest service, that I can provide to components. 
> (instead of putting it in ngModule)
> Then in my component, I provide the endpoint URL. After that, I can just 
> use the get/put/etc services from the service. The upside of this approach 
> is that inside all lower level components I can just use the service, and 
> it would be the same instance with the same setting, and I don't need to 
> provide the URL anymore.
>
> Hope this helps you a bit,
> Regards
> Sander
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to