[Angular + Webpack] ocLazyLoad compoment

        $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;
}]
}
})
上一篇:写出bool,int,float,指针与零值比较的if语句


下一篇:Windows NT 的历史