I need to make two HTTP call one after another before angular initialize. Is there any way to initialize angular 2 synchronously?
Please do not say our app should work asynchronously. I am working on generic build using "angular-cli" . First i need to fetch the environment which is set in a json file and on the basis of that environment i need to load configuration. So i need two HTTP calls.
{
provide: APP_INITIALIZER,
useFactory: (config: AppConfig) => () => config.load(),
deps: [AppConfig], multi: true
}
Inside load() i have two http call one inside other but before two call get completed angular is initialized.