Created
April 22, 2015 07:18
-
-
Save YonasBerhe/061b107bbee4b7b5301b to your computer and use it in GitHub Desktop.
I keep getting this error in my console each time I run my angular app. I don't like Majic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function minErr(module, ErrorConstructor) { | |
ErrorConstructor = ErrorConstructor || Error; | |
return function() { | |
var code = arguments[0], | |
prefix = '[' + (module ? module + ':' : '') + code + '] ', | |
template = arguments[1], | |
templateArgs = arguments, | |
message, i; | |
message = prefix + template.replace(/\{\d+\}/g, function(match) { | |
var index = +match.slice(1, -1), arg; | |
if (index + 2 < templateArgs.length) { | |
return toDebugString(templateArgs[index + 2]); | |
} | |
return match; | |
}); | |
message = message + '\nhttp://errors.angularjs.org/1.3.15/' + | |
(module ? module + '/' : '') + code; | |
for (i = 2; i < arguments.length; i++) { | |
message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' + | |
encodeURIComponent(toDebugString(arguments[i])); | |
} | |
**return new ErrorConstructor(message);** | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('store', []); | |
var app = angular.module('store',[]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment