I want to make dynamic REST client in Angular that would be able to detect changes in a remote repository and subsequently update data.
I saw implementation of this in few examples, but they put all refetch logic in components. Is this the correct approach? If fetched data is spread across multiple components that would require lot of boilerplate code (or maybe inheritance of some kind?)
How to put logic of refetching into service (any examples of how to do it correctly and with style)?