Reputation: 4340
It looks like the old way of doing that was this:
bootstrap(App, [
provide(ExceptionHandler, { useClass: CustomExceptionHander })
])
How do you do it in the app.module.ts (post rc-5)?
Upvotes: 0
Views: 104
Reputation: 658017
update ExceptionHandler
was renamed to ErrorHandler
https://stackoverflow.com/a/35239028/217408
orgiginal
The syntax you use was deprecated a while ago and was removed in recent versions already.
Use object literal syntax like this instead:
@NgModule({
providers: [{provide: ExceptionHandler, useClass: CustomExceptionHander }],
...
})
Upvotes: 2