我有这项服务来读取资源数据:
服务
function ComplaintPageService ($log, customService) {
'use strict';
var Service = function() {
this.load = function load(controller, scope) {
// TODO define configuration
var loadConfig = [
{ name: 'priorities'}
];
return customService.load(controller, loadConfig);
};
};
return new Service();
}
在控制器中我console.log
范围。
function ComplaintPageController($log, $scope, complaintPageService) {
'use strict';
var promises = complaintPageService.load(this, $scope);
console.log(promises);
console.log($scope);
}
如何从PrioritiesResource
?