How to find Angular Errors

errors
angularjs
exceptionHandler

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:

How to upload file by using request module

18-03-2017 request module node js

Sanitization in java sript

14-03-2017 sanitization java script

Get previous date from given date in javascript

06-03-2017 date javascript previous date

Navigate to another page using java script

06-03-2017 javascript redirection navigation

Get random strings from given string In javascript

21-02-2017 javascript random string