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:

Time Sorting Ascending or Descending Order in Javascript

19-07-2017 Javascript ascending order descending order

How to use request module in node js

16-03-2017 request module node js

Remove last two characters from given string

06-03-2017 substring javascript remove

Get previous date from given date in javascript

06-03-2017 date javascript previous date

Filter for replace text in Angular Js

05-03-2017 filter replace angular js