我想在120 =>abcdefg NULL
中使用state resolve
加载的服务ocLazyLoad
。state resolve
。如下所示:
.state('meniu', {
url: '/meniu',
params: { lang: 'ro'},
templateUrl: 'views/meniu/meniu.html',
controller: 'meniuController',
resolve:{
loadMyCtrl: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load(['pageNavPropsService', 'meniuCtrl', 'customHeader', 'customFooter']);
}],
,
loadMyData: ['$http','$stateParams', 'GetDataService', function($http, $stateParams, GetDataService){
var path = '_global/views/services/json/' + $stateParams.lang + '_data.json';
return GetDataService.getData(path);
}]
}
})
我尝试过这样但没有成功:
loadResources: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load(['getDataService','pageNavPropsService', 'bauturiCtrl','customHeader', 'customFooter'])
.then( function(GetDataService){
GetDataService.getData("path");
});
}]/*,
如何做到这一点?