Discussions

Ask a Question
Back to All

unable to load moules with grunt js

I am facing the same issues with loading files with ocLazyLoad.js

This is my config in routing ,

$ocLazyLoadProvider.config({
'debug': true, // For debugging 'true/false'
'events': true, // For Event 'true/false'
'modules': [{ // Set modules initially
name : 'reportModule', // State1 module
files: ['src/app/reportModule/controllers/reportModule.js','src/app/reportModule/models/reportModuleService.js']
}]
});

$stateProvider.state('reportModule', {
url: '/reportmodule',
views: {
"main": {
controller: 'ReportModuleController',
templateUrl: 'reportModule/views/reportModule.tpl.html'
}
},
resolve: {
loadMyCtrl: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load('reportModule'); // Resolve promise and load before view
}]
},
data: {
pageTitle: 'Report'
}
});

Other than that i want to tell you that my projects loads all the modules with grunt's tasks
So how does that affect ondemand loading .?
Can you Please help me ?

Regards.