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:
Check null values in JavaScript?04-02-2019 JavaScript null check null value |
Use java script file client side and server side at a time in node js30-07-2017 node js include call javascript |
Detect AdBlock with JavaScript in my browser30-07-2017 AdBlock javascript detect |
Get previous date from given date in javascript06-03-2017 date javascript previous date |
Call a function every second or 5 seconds in javascript22-02-2017 setinterval function calling |