I have situation where a resolver should start resolving only once a configuration API response is received.
Initially, a configuration API is called from app.component.ts. This response is saved in localstorage. The resolver needs to get the attributes from config data stored in localstorage to pass to API called from Resolver.
- If the localstorage is already present in the application, the resolver works fine.
- But if we try to hit the URL directly, the resolver will not receive the localstorage data as the configuration API response might be delayed or not saved to localstorage when resolver tries to access them.
UPDATE: All API calls are using subscribe function
How can I able to execute resolver only once the configuration API response is received and saved to localstorage.
Thanks in advance