Error handling in angular2/4
Error handling is one of those things no one wants to deal with, well in Angular you can create a global handler and never have to worry again.
Angular defines an ErrorHandler class that will allow us to override it and handle custom logic. Typically, I have my error handlers do things like:
- Show some sort of notification to the user via a dialog or growl-like component (ideally with a emoji)
- Send the error details to the server for logging
Whatever you're doing in this logic, here’s how we go about it…
for more information :https://medium.com/@amcdnl/global-error-handling-with-angular2-6b992bdfb59c
Happy coding,
Bhaskar
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home