I am doing it as follows but this is not possible as boostrapapplication expects 1 or 2 arguments.
import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { AppComponent } from './app/app.component';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { ExampleInterceptor } from '../../../libs/shared/src/interceptors/example.interceptor';
bootstrapApplication(AppComponent, appConfig, {
providers: [
{ provide: HTTP_INTERCEPTORS, useClass: ExampleInterceptor, multi: true }
]
}).catch((err) => console.error(err));
You need to add the providers to the
appConfig
object. It already contains other provider definitions.