1
|
import { HttpErrorInterceptor } from './http-error.interceptor';
|
2
|
import { GlobalErrorHandler } from './global-error-handler';
|
3
|
import { NgModule, ErrorHandler } from '@angular/core';
|
4
|
import { CommonModule } from '@angular/common';
|
5
|
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
6
|
|
7
|
@NgModule({
|
8
|
declarations: [],
|
9
|
imports: [CommonModule],
|
10
|
providers: [
|
11
|
{ provide: ErrorHandler, useClass: GlobalErrorHandler },
|
12
|
{ provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }
|
13
|
]
|
14
|
})
|
15
|
export class ErrorHandlingModule { }
|