-
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
are there breaking changes in 0.5.2 for Angular 1.3 #111
Comments
Hmm there shouldn't be any breaking change, no. I'll check it out tomorrow. |
Looks like I'm using 1.3.0 but I'll verify. ------ Original Message ------
|
Ok, I verified and I was on 1.3.0. Just in case and because it's probably time anyway, I upgraded angular to 1.3.8. Same problem. Here is a route I have configured but since it happens on start up I'm only assuming this is the route that's failing. I configure all the routes exactly the same so that should help. .when('/', {
templateUrl: 'apps/mashup/welcome/welcome.html',
controller: 'mashup.welcomeController',
controllerAs: 'vm',
resolve: {
loadMyCtrl: ['$ocLazyLoad', function ($ocLazyLoad) {
return $ocLazyLoad.load({
name: 'mashupApp',
files: ['apps/mashup/welcome/welcome.controller.js']
});
}]
,
sessionLoad: ['$route', 'sessionLoad', function ($route, sessionLoad) { return sessionLoad.loadCompleted(); }]
}
});
}]); |
Ok I just checked with 1.3.8 and it works just fine. |
i absolutely love this module. dynamic loading of modules and files are a definite need and should be core to angular. however.... i seem to be having the same problem. i'm using ui-router. i have an abstract route tree that have core dependencies to my application. from the resolve i'm lazily loading my controllers like above and from my controllers i'm injecting my dependencies. everything works great -- all my dependencies get injected until i load the last node in my route tree then i loose my dependencies and i get the above error. i using angular 1.3. tried oclazyload .5.1 and oclazyload .5.2 |
I cannot reproduce the problem, I tried with the minified version (thinking that maybe something was wrong here) and angular 1.3.8 but it works just fine (with the examples and with my app that uses the lib)... |
Maybe it's the way I'm using ocLazyLoad. I can't upgrade and that's ok. ------ Original Message ------
|
But it shouldn't be the case :( |
I will. Thank you for the help. I need to finish up a new task and then I'll come back and try again. ------ Original Message ------
|
i'm wondering if it's the way i'm using ocLazyLoad too. i put up a non working plunk (http://plnkr.co/edit/gsVOA9ZN2AEC0cSu6LnN?p=catalogue) but i hope it gets my point across. i config my angular app and inject my core services ['kameeyo.core']. i write my routes scripts from serverside. from my routes i dynamically inject my controller but it doesn't see my Authentication service from kameeyo.core. i tried to dynamically load my core services but that didn't work either. |
my bad. it was my error. in my core files i was defining each of the modules the same name 'kameeyo.core'. i fixed by changing each of the module names and making sure the kameeyo.core module had all it's dependencies. thanks. |
Ah good to know :) |
Possibly related, I get: Was not able to reproduce with a simple plunkr. Will try to simplify the failing code when I have the chance. Very helpful library, thank you. |
This new error message "No module found during bootstrap, unable to init ocLazyLoad" has been added as a safeguard with 0.5.2 to avoid wrong initializations of ocLazyLoad that would lead to bugs later (modules loaded but undetected). |
I'm getting the "No module found during bootstrap, unable to init ocLazyLoad" when running tests through Karma. Looking at the code, it appears that it is looking for an "ng-app" reference in the page being loaded, I think to get a list of already-loaded modules. But Karma starts up a stand-alone browser window with its own blank page in it. Is it possible to get ocLazyLoad to start properly under Karma? |
Ok guys, I think I fixed your problem AND added the compatibility with karma, could you all try the current master src file (this one from the src folder, not from dist) and let me know if it's ok ? I'll make a new release if that's the case |
Hi Olivier,
to:
jsidMyAccount due to:
due to:
'{"files":["apps/myProfile/controllers/personalDetails","apps/myProfile/cont http://errors.angularjs.org/1.2.26/$injector/nomod?p0=%7B%22files%22%3A%5B%2
/Users/rob/Repo/project-whistler/jsidentity/app/static/jsidentity/components
/Users/rob/Repo/project-whistler/jsidentity/app/static/jsidentity/components
(/Users/rob/Repo/project-whistler/jsidentity/app/static/jsidentity/component
(/Users/rob/Repo/project-whistler/jsidentity/app/static/jsidentity/component
(/Users/rob/Repo/project-whistler/jsidentity/app/static/jsidentity/component
(/Users/rob/Repo/project-whistler/jsidentity/app/static/jsidentity/component
(/Users/rob/Repo/project-whistler/jsidentity/app/static/jsidentity/component
(/Users/rob/Repo/project-whistler/jsidentity/app/static/jsidentity/component
/Users/rob/Repo/project-whistler/jsidentity/app/static/jsidentity/components
(/Users/rob/Repo/project-whistler/jsidentity/app/static/jsidentity/component Best regards, Rob Rob Macgregor Email: rob.macgregor@pirean.com From: Olivier Combe notifications@github.com Ok guys, I think I fixed your problem AND added the compatibility with ‹ Pirean - A Security Software and Consultancy Partner. Pirean, One Canada Square, London, E14 5AA, United Kingdom. Registered in Any information, methodologies and intellectual property discussed in this This e-mail is only intended for the person(s) to whom it is addressed and |
Ok, do you have the piece of code that produced this bug please? I have an idea of what it might be but the code would help. |
Sorry it took me a few days to update. I just updated my ocLazyLoad and it works like a dream. Thanks for the fix... |
@ocombe @robertdunaway i can also confirm that the fix works, waiting on the release |
@ocombe I can also confirm that this fix works. Waiting on release. In our case we were using Angular 1.2.18 and ocLazyLoad 0.5.2. |
@ocombe This appears to have fixed the issue I was seeing, however now I get a new error. We are using ng-lodash and they are using a trick in the way it is defined / provided: angular.module('ngLodash', []).constant('lodash', null).config([
'$provide',
function ($provide) {
// ...
$provide.constant('lodash', _);
}
]); The initial Things seem to work if I just add a null check in |
Hi @ocombe I was having the same problem about "No module found during bootstrap, unable to init ocLazyLoad", but after update my oclazyload.js from src folder at github this problems disappeared. |
Ok thanks for the report @tclift, I just pushed a commit to fix this. I will change the way I define signature soon to only keep a hash (because storing the full string of a function consumes too much memory for nothing), but for now it should work ! |
@gustavolira check this message, it might help you: #129 (comment) |
Thanks @ocombe, confirming fix and null constants working in 0.6.0. |
I tried to upgrade my ocLazyLoad to 0.5.2 and I'm getting errors. I'm not sure where to start on debugging it so I though I'd ask if there are known issues.
Here is what I get.
"[$injector:modulerr] http://errors.angularjs.org/1.3.0/$injector/modulerr?p0=oc.lazyLoad&p1=Erro…alhost%3A50001%2Fcore%2Flib%2FangularJS%2F1.3.0%2Fangular.min.js%3A7%3A302)"
The text was updated successfully, but these errors were encountered: