I want to call a API before angular4 AppModule is started/initialized. is this possible?
@NgModule({
declarations: [
APP_COMPONENTS,
AppComponent
],
imports: [
BrowserAnimationsModule,
FormsModule,
],
bootstrap: [AppComponent]
})
export class AppModule {
constructor(){
console.log('Init. Module...');
}
}
Before the bootstrap component 'AppComponent' initialized, i want to call a API.