I am using ionic 2. I want to track every error that occur in ionic 2 app.component.ts
file .Is there any solution for this ?
Thanks in advance
I am using ionic 2. I want to track every error that occur in ionic 2 app.component.ts
file .Is there any solution for this ?
Thanks in advance
You need to use IonicErrorHandler class for that.This is a global error handler.
app.module.ts
Now if you just do
throw new Error('Im error')
anywhere in your application, you will see your console message.Here is a great article about it with custom error handling.