Reputation: 1557
What are the general decision rules around when to implement ng2 services? I'm fairly new to ng2 but I was thinking that they should just be used as a wrapper for external API calls. It seems like any other use could potentially be ambiguous and/or confusing. Technically, any isolation of logic into an encapsulated class could be considered a "service" but in that case I would simply put this logic into its own class without calling it a "service."
Upvotes: 0
Views: 44
Reputation: 1579
Angular services
are very helpful not just only writing wrapper for external api or something else but there are a number of use cases where services are very helpful. Some of the use case are described as:
Upvotes: 2