Hi Stephen and Sander, I am going through the same situation in one of my application. I want to create a generic data service. Could you please help me by providing a code snippet for the same. Any help would be appreciated. Thanks.
On Friday, September 30, 2016 at 10:26:52 PM UTC+5:30, Stephen Rios wrote: > > 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 "Angular and AngularJS discussion" 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.
