标签:
$stateProvider .state(‘landing‘, { url: ‘/‘, views: { ‘body@‘: { template: ‘<olr-landing></olr-landing>‘ } }, resolve: { loading: [‘$q‘, ‘$ocLazyLoad‘, function ($q, $ocLazyLoad) { let deferred = $q.defer(); require.ensure([], function () { let landingModel = require(‘../app/landing/index.js‘)(ngModule); $ocLazyLoad.load({ name: ‘app‘ }); deferred.resolve(landingModel); }); return deferred.promise; }] } })
[Angular + Webpack] ocLazyLoad compoment
标签:
原文地址:http://www.cnblogs.com/Answer1215/p/4976466.html