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:

Check null values in JavaScript?

04-02-2019 JavaScript null check null value

Convert Time 24 hrs to 12 hrs format In javascript

12-03-2017 date javascript 12hrs convert

Filter for replace text in Angular Js

05-03-2017 filter replace angular js

Filters for convert text to camel case in Angular Js

05-03-2017 angularjs camelcase filters

Email validation regular expression in javascript

22-02-2017 email validation regex