You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
awesome/src/app/error-routing/error-routing.module.ts

22 lines
682 B
TypeScript

import { ErrorHandler, NgModule, Provider } from '@angular/core';
import { environment } from '../../environments/environment';
import { GlobalErrorHandlerService } from './error/global-error-handler.service';
import { UncaughtErrorComponent } from './error/uncaught-error.component';
import { PageNotFoundComponent } from './not-found/not-found.component';
const providers: Provider[] = [];
if (environment.production) {
// register prod error handler
providers.push({ provide: ErrorHandler, useClass: GlobalErrorHandlerService });
}
@NgModule({
declarations: [
PageNotFoundComponent,
UncaughtErrorComponent
],
providers
})
export class ErrorRoutingModule { }