In my Ionic app, I have two async requests that must complete before I want my app component to load as part of a fairly involved initialization procedure. The first request is configuration related and the second is session related. They must complete in succession.
Simply chaining the two request observables is not an option because of dependencies (I won’t elaborate here). However I would assume that APP_INITIALIZER
, being a multi-provider, would allow me to chain two together, each with their own injected dependencies.
Is it possible to have multiple APP_INITIALIZER
s and if so, I’d love to see a real-world example. If not, is there a better way to do get the same result?