angular - Angular2: Application crashes/ becomes unresponsive after encountering an exception/ error -


how tell angular not block whole application when encounters exception?

i'm not sure if it's possible because google didn't enlighten me on this. seems critical single page web application.

angular fast , whenever encounters exception , throws error, complete application becomes unresponsive.

i know in javascript

try {   dosomething(); } catch(err) {   handleerrors(err); } 

might solve problem.

but want know if there angular specific solution or workaround ?

on angular 2 final version, can implement custom errorhandler.

example angular docs:

import {ngmodule, errorhandler} '@angular/core';  class myerrorhandler implements errorhandler {   handleerror(error) {     // exception   } }  @ngmodule({   providers: [{provide: errorhandler, useclass: myerrorhandler}] }) class mymodule {} 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -