[Web pack with ocLazyLoad] Fails to load the controller and template
manjudr opened this issue · comments
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)
};
When I use webpack for minification ocLazyLoad
is not working with webpack. 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 the path.?