Currently in my app I have built a crud page, I'll use heroes as an example. I have a table which lists all the heroes which are retrieved via an API call. Each of the crud functions are their own components (view component, edit component etc). Each one of those pages is displayed via a routerlink.
How do I correctly share data between these components? From what In the documentation the author will do another API request when they want to edit a hero instead of just selecting the hero out of the array.
What is the correct way to access the array of heroes? I think I'm supposed to use the hero.service, do I just create an array in the service which is populated when the first api call to get all the heroes is made?