0
上模塊寄存器我有寄存器如下模型:錯誤注射器時在角
var angularTest = angularTest || {};
angularTest.app = angular.module('angularTest', ['xPlat.service', 'xPlat.controller', 'xPlat.directives', 'xPlat.repository']).run(function (DB) {
DB.init();
});
angular.module('xPlat.config', []);
angular.module('xPlat.directives', []);
angular.module('xPlat.controller', []);
angular.module('xPlat.service', []);
和我與正確的使用的控制器(它不是錯誤),如下:
angularTest.app.controller('logInController', ['$scope', '$http', function ($scope, $http) {
$scope.login = function() {
var request = $http({
method: "post",
url: "http://localhost:4309/Account/Login",
data: ""
})
}
}]);
但這個控制器下面有錯誤:
(function() {
'use strict';
angular.module("xPlat.controller", ['xPlat.service'])
.controller('itemController', function ($scope, itemService) {
// todo something
});
})();
我想改變它像上面的logInController。我該如何改變它?