This module is for automatically handling errors in application, it override the default behaviors of the ErrorHandler provided by Angular.
npm install @nhaancs/error-handlingThis module is for automatically handling errors in application, it override the default behaviors of the ErrorHandler provided by Angular.
You only need to import this module to your app and replace the default error handler with ErrorHandlingService. Our new service will automatically handle when new error occurs.
``typescript
@NgModule({
...
imports: [
...
ErrorHandlingModule,
],
providers: [
...
{
// replace default error handler with ErrorHandlingService
provide: ErrorHandler,
useClass: ErrorHandlingService,
deps: [ConfigurationService, LoggingService],
},
]
})
`
``
...
"angularCompilerOptions": {
// publishable library cannot build with ivy
"enableIvy": false
},
...
This library was generated with Nx.
Run nx test error-handling` to execute the unit tests.