The example below will overwrite the default $exceptionHandler in order to (a) log uncaught errors to the backend for later inspection by the developers and (b) to use $log.warn() instead of $log.error().
By using this $exceptionHandler the errors will display clear,
angular.module('test').factory('$exceptionHandler', function() { return function(exception, cause) { exception.message += 'Angular Exception: "' + cause + '"'; throw exception; }; } );
You might also like:
Example for Conditional Operator in php16-04-2017 php Conditional Operator example |
How to get id by using name attribute in javascript20-03-2017 html id name javascript |
How to make an http request in node js14-03-2017 http module node js |
How to convert html to pdf in Node js12-03-2017 pdf convert html node js |
Email validation regular expression in javascript22-02-2017 email validation regex |