我正在尝试使用service.js通过JSON发布http: -
App.service('loginService', function($http, $scope) {
var user = {};
this.login = function(user) {
var request = {
"user": user.id,
"password": user.pass
};
var promise = $http.post("http://vlinux:9099/Authenticate", request);
return promise.data;
}
});
但我得到以下错误
angular.min.js:125错误:[$ injector:unpr] http://errors.angularjs.org/1.6.7/ $ injector / unpr?p0 =%24scopeProvider%20%3C-%20%24scope%20%3C-%20loginService