Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Web pack with ocLazyLoad] Fails to load the controller and template #423

Open
manjudr opened this issue Jun 18, 2018 · 0 comments
Open

Comments

@manjudr
Copy link

manjudr commented Jun 18, 2018

    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.?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant