philippd / angular-deferred-bootstrap

Initialize your AngularJS app with constants loaded from the back-end.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Am I able to use ocLazyLoad?

vitorcamachoo opened this issue · comments

Hii, I'd like to be able to use ocLazyLoad in one of the available resolves like:

window.deferredBootstrapper.bootstrap({
  element: document.body,
  module: 'App',
  resolve: {
    THEME: function ThemeFn($rootScope, $q, $http, $ocLazyLoad) {
        return $http
           .get('angular module')
           .then(function(moduleName) {
               return $ocLazyLoad.load({ name: moduleName });
           });
    },
  },
});