In my simple Angular app, each routed component relies on data fetched from an API right after the application loads. I decided that the best approach is to initiate fetching in the root component, which also contains the router outlet. However, the activated routed component is unable to fetch data from its specific address without first obtaining the data from the root component. This results in errors because it does not wait for the initial fetching process to complete.
My question now is: How can I make the routed component wait until the fetching in the root component is done? Is there a way to pass information between components using a service or trigger it from the root component? Any other suggestions?