ocLazyLoad
ocLazyLoad copied to clipboard
code breaking after moving from 0.5.0 to 1.0.9 version
In my application i was using ocLazyLoad.load(name: RequiredModule,files: []).then(function () { } to load modules. But when i move to 1.0.9 load function started throwing error "no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.
so i modified the code to use inject ocLazyLoad.inject(name: RequiredModule,files: []).then(function () { } but i am getting unknown provider error. like I am loading module A which is dependent of module B. And while loading module A service in module B is throwing unknown provider error. The same code is working with load function of 0.5.0. Please suggest what am i missing.
Let me add some more information. Able to resolve the issue with 1.0.9 when we inject along with all dependent module. Let me explain as below : A module is dependent on B in 0.5 i was able to get injector using following code - angular.injector(['ng','A'); But in 1.0.9 it is not working and saying injector is not able to resolve xxx service from B module. if i do the following change it starts working - angular.injector(['ng','B','A']);
Any update on this?
I think this is the related issue (chaining dependency resolving) which is mentioned in the following : https://github.com/ocombe/ocLazyLoad/issues/198 https://github.com/ocombe/ocLazyLoad/issues/214