-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
If you have HTTP Interceptors from Angular, https://angular.io/api/common/http/HttpInterceptor, then this will be ignored from this ngx-restangular.
So it would be nice if someone could integrate this.
src/app/app.module.ts
export function RestangularConfigFactory(RestangularProvider) {
RestangularProvider.setBaseUrl(environment.url);
RestangularProvider.addFullRequestInterceptor(AuthInterceptor); // <- Not working!
}
@NgModule({
imports: [
RestangularModule.forRoot(RestangularConfigFactory),
HttpClientModule,
],
providers: [
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true }
],
bootstrap: [AppComponent]
})
export class AppModule {}
Thanks in Advance!
xuyi0130
Metadata
Metadata
Assignees
Labels
No labels