I have newly included the lazyload library.
var app = angular.module(subdomain, ['ngRoute','ngResource','ngCookies','ngSanitize','angular-md5','mm.foundation','chieffancypants.loadingBar', 'ngAnimate','ui-notification','infinite-scroll','oc.lazyLoad']);
I have loaded the controller in routes page:
$routeProvider
.when('/',
{
templateUrl: 'app/components/home/home.html',
access: { requiredLogin: true },
resolve: {
lazy: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load([{
name: 'app',
files: ['dist/home.min.js']
}]);
}]
},
controller: 'homeController'
})
and my controller file has:
app.controller("homeController",[....])
I am getting home controller not defined error. If I change the app to angular.module in the controller its working but that's not what I want. Is there any solution for this so I can use app variable?