I use oclazyload to reduce response time. When loading the homeController, I see that it has been loaded onto the network tab via oclazyload. But the controller does not start when the html page is called. I get an error, for example:
Error: [ng:areq] http://errors.angularjs.org/1.3.12/ng/areq?p0=homeController&p1=not%20aNaNunction%2C%20got%20undefined
my Routes config:
$routeProvider.when('/',
{
templateUrl: 'app/components/home/home.html',
controller: 'homeController',
resolve:
{
loadMyCtrl: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load('app/components/home/homeController.js');}]}});
How can i solve this?
source
share