-
Notifications
You must be signed in to change notification settings - Fork 509
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
Using oclazyload with $routeProvider giving controller is undefined. #182
Comments
Everything looks fine in this code. Do you have the code of the controller ? |
|
Change |
Yippee .. Thanks a lot!!! |
@ocombe, I just ran into this same problem when implementing ocLazyLoad and had to go through and redefine all of my controllers and such after wasting a lot of time trying to find the problem... What's the difference between Also, is there a way to map |
The difference is a question of variable scopes. The variable app is not available within another file. If you define it on window.app, then it would work. |
as following this thread i modified my controller like : define(['angular', 'lodash'], function(angular, _) { but still same problem : Argument 'homeCtrl' is not a function, got undefined. please give me some hint to over come with this |
+1 |
1 similar comment
+1 |
if you want to use
|
Hi ,
I have removed the controller js file from the head section of my main html file in order to lazy load it.
I am using $routeProvider
The file timeController.js is perfectly being loaded as i can see it in the network tab of browser console.
But still i am getting the error Argument 'timeController' is not a function, got undefined.
Plz help.
The text was updated successfully, but these errors were encountered: