I have a design question about when and where to send multiple HTTP requests for initialization information (types, business dates etc) that will be displayed in all components.
Right now I have my auth.guard that after the user signs in retrieves the user claims and authorization rules and then checks if the user is authorized. The guard returns true or false based on their roles. From here I have around 10 info HTTP calls that are the same for most of my components. But I want to keep these HTTP calls out of my auth.guard since they can run in the background as the component loads and it should not be the auth.guards responsibility.
I am also using a shared service that uses BehaviorSubjects so multiple components can subscribe to the value.
So, my main question is, what is the best practice so that after the auth.guard returns true, run x amount of HTTP requests and update the shared service. This needs to be applied to any number of components.
Also been looking at route resolvers which might solve the issue, but I would rather save the data to a shared service instead of return the data to the component and have to wait.
Another piece that makes this a little more complicated is that I have my 10 HTTP calls spread throughout multiple services, so if I have a shared service it would need to inject all of the other services.