1

I could inject lazy loaded libraries to my modules according to this Stackoverflow answers, but the answer is just describing and working with injecting one module (even with more than one file). But, I have a route and I want to lazy loading two libraries in that route (ngMap and ngFileUpload)

Here is my code with one dependency injection:

$routeProvider.when('/test-route', {
    templateUrl: 'test.html',
    controller: 'testController',
    resolve: {
        store: function ($ocLazyLoad) {
            return $ocLazyLoad.load(
                {
                    serie: true,
                    name: "ngMap",
                    files: [
                        "./files/ngMap.js"
                    ]
                }
            );
        }
    }
});

But I also need ngFileUpload in this route, but I don't know how to lazy loading it. Help me please

Thank you very much This website is verry Useful and Helpful

Community
  • 1
  • 1

0 Answers0