这是我的模块:
var REMOTE_SERVER_URL = 'http://139.196.141.166:8084/';
angular.module('app.payment', ['app.common','ui.router','bootstrap3-typeahead','ui.bootstrap'])
.constant('courseApiSet', {
//course outline
'incomeProfile' : REMOTE_SERVER_URL+'course/income/outline',
})
.config(function($stateProvider) {
$stateProvider.state('app.payment', {
url : '/paymentManagement',
templateUrl : 'modules/payment/views/paymentManagement.html',
controller : 'PaymentCtrl',
resolve : {
incomeProfile : ['httpService', 'courseApiSet', function(httpService, courseApiSet){
var url = courseApiSet.incomeProfile, data = {};
return httpService.postService(url,data);
}]
}
})
.state('app.paymentinfo', {
url : '/PaymentInfo:userId',
templateUrl : '/modules/payment/views/paymentInfo.html',
controller : 'PaymentInfoCtrl',
});
});
这是我的Ctrl:
angular.module('app.payment').controller('PaymentCtrl', ['incomeProfile','$scope','$state','courseApiSet','httpService',
function(incomeProfile,$scope, $state,courseApiSet, httpService){
$scope.payment = incomeProfile.body;
console.log($scope.payment);
}]);
获取错误错误:[$ injector:unpr]未知提供者:incomeProfileProvider< - incomeProfile< - PaymentCtrl
但我,我从服务器获取所需的所有数据。为什么会出现这种错误?