16 lines
563 B
TypeScript
16 lines
563 B
TypeScript
import { HttpErrorInterceptor } from './http-error.interceptor';
|
|
import { GlobalErrorHandler } from './global-error-handler';
|
|
import { NgModule, ErrorHandler } from '@angular/core';
|
|
import { CommonModule } from '@angular/common';
|
|
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
|
|
@NgModule({
|
|
declarations: [],
|
|
imports: [CommonModule],
|
|
providers: [
|
|
{ provide: ErrorHandler, useClass: GlobalErrorHandler },
|
|
{ provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }
|
|
]
|
|
})
|
|
export class ErrorHandlingModule { }
|