You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is happening is that if there's something like a template error and you've "handled" the error, change detection will continue to run over and over causing the infinite loop. You need to throw an error at the end of the function.
However, since unhandled http errors (and other smaller errors that could be easily handled) will also throw the error at the end and will cause change detection to stop running. The trick is to only throw an error at the end when it's something that you cannot handle or that should cause change detection to stop running (like template errors)
When I use ToastrService in my custom error handler when if there are any error into angular 6 view then cause infinite loop and message no show:
Angular versión: 6.0.8
Toastr version 9.0.2
My code:
import { ToastrService, IndividualConfig } from 'ngx-toastr';
@Injectable()
export class GlobalErrorHandlerService extends ErrorHandler {
}
Regards,
The text was updated successfully, but these errors were encountered: