-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Library ToDo #1
Comments
what about a permanently displayed toast for validation errors? me thinks... |
Nah, the idea is to match the original |
Me again... didn't know the timeout to 0... thanks... Miguel Delgado |
Yes I do. This is not a problem with my library, it is just a couple of services in angular that are problematic in this manner. The problem is because the If you have a library The problem also resides when The solution is to load in runtime a dependency when needed, that way it wouldn't throw any error. Check this: (function() {
'use strict';
angular.module('app').factory('$exceptionHandler', exceptionHandler);
exceptionHandler.$inject = ['$injector'];
function exceptionHandler($injector) {
return function(exception, cause) {
var logger = $injector.get('logger');
var config = $injector.get('config');
var appErrorPrefix = config.appErrorPrefix;
var logError = logger.getLogFn('app', 'error');
var errorData = { exception: exception, cause: cause };
var msg = appErrorPrefix + exception.message;
logError(msg, errorData, true);
};
}
}()); That is how you would resolve the issue following Papa's code conventions. Check how I load I don't recall if the The So the rule here is when you have a |
Wow! thanks a lot, this seems to be a really good tip. I will check against my code (already a variant from Hottowel) and let you know... Thanks |
@Foxandxss thank you for circular dependency solution, i`ve just implemented it to my project, but when error is handled, i get - "logger.getLogFn is not a function". Do you have any idea how to solve it? Thanks in advance! |
There are the things I want to accomplish for the first release:
The text was updated successfully, but these errors were encountered: