We need to ensure in Angular 4 application that on bootstrap of AppModule (root module) there will be information about loggedin user already available. How to achieve it?
I was trying to implement this solution:
How to call an rest api while bootstrapping angular 2 app
but the problem is - application just send a request while bootstraping. I need to have data on initialization, that's why I'd like to start bootstraping on promise success.
I also tried this one:
How to bootstrap an Angular 2 application asynchronously
But it seems out-of-date.
Injector.resolveAndCreate() method not exists in Angular 4 version and HTTP_PROVIDERS cannot be imported. Any other ideas / solutions?