-
Notifications
You must be signed in to change notification settings - Fork 510
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
Error on lazy load from a lazy loaded file #43
Comments
Any ideas? |
Oups sorry I forgot to answer yesterday. |
Ok, is it possible that you are lazy loading ocLazyLoad somewhere ? |
The first file lazy loaded is the one paste above. As you can see on it, it tries to load other files, but there is when it fails. I'm trying to create a plnkr snippet, but I cannot make it work. I'm not lazy loading ocLazyLoad anywhere else. Actually, that code is all I have there. |
Ok I can reproduce. You're not supposed to do a $ocLazyLoadProvider.config({
debug: true,
events: true
}); in the lazy loaded module. The lib has already been configured. Just remove this and you'll be fine |
Thanks @ocombe! However, that does not fix the error either :( And by the way, this is the pnkr I cannot make work. |
Ok, I finish the fix and I'll release it in 10mn. |
It's available in release 0.3.2 :) |
Thanks a lot. It fixes that error. Now are being loaded. You know what, I think I know why it is "configured" again. I have this in my main app file:
And in the main controller: $ocLazyLoad.load([{
name: "StreamApp",
files: [
"/js/angular/includes/states.js", Because of that, the first config is being executed twice. I think it is related to bug #41. Is there a solution for that? I've tried to do it $ocLazyLoad.load([{
name: "StreamApp2",
files: [
"/js/angular/includes/states.js", And in states define the second streamapp but the state is not registered. :( |
Yes it's probably the same thing. I'll take a look at it tomorrow. |
Thanks a lot. In the meantime I'll find another way. |
Fixed in 0.3.3 ! |
Excellent! It worked ;) |
I have one problem. Your module works very fine, however when I try to lazy load from a lazy loaded file it says:
I can add the same function you have in line 104, but while the error is not showed anymore it does not load the files either... Am I doing something wrong?
The text was updated successfully, but these errors were encountered: