var templatePath = require('../templatePath');
var controllerPath = require('../ControllerPath');
$scope.loadNgModules = function(templatePath, controllerPath) {
var files = [];
if (templatePath) files.push({ type: 'html', path: templatePath });
if (controllerPath) files.push({ type: 'js', path: controllerPath});
if (files.length) return $ocLazyLoad.load(files)
};
ocLazyLoad
is not working When I use webpack for minification. Since I guess ocLazyLoad accepts only path of the template and controller but webpack is bundling both template and controller into the single minified file so it fails to load.
Webpack plugin name : uglifyjs-webpack-plugin'
Is there any way to accomplish this problem using ocLazyLoad.? Can I load a string of template and controller file other than considering path.?
As per my understanding basically ocLazyLoad accepts only path of the script and template files
So I have resolved this issue by using
$templateCache
}
Hope this will helps to someone :-)