Just add this code to handle error in angularjs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory('$exceptionHandler', function ($log) { | |
return function (exception, cause) { | |
exception.message += ' (caused by "' + cause + '")'; | |
$log.error(exception); | |
throw exception; | |
}; | |
}); |