angularjs怎么实现页面向后台传值
我这样传值怎么说是个空的JSon子对象varmodifypasswordController=function($scope,$http,LoginService){al...
我这样传值怎么说是个空的JSon子对象
var modifypasswordController = function($scope, $http, LoginService) {
alert("1111");
$scope.save = function() {
alert("22222");
$scope.req = {
password:$scope.password,
password1:$scope.password1
};
alert($scope.req.password);
// $scope.req.agents_id = LoginService.agentid;
$scope.info();
};
$scope.info = function() {
$http.post("api/agent/modifyPassword",$scope.req).success(
function(data) {
alert("aasaa");
//$scope.info=data.message;
alert(data.message);
});
};
$scope.save();
};
modifypasswordController.$inject=[ '$scope','$http','LoginService' ];
modifypasswordModule.controller("modifypasswordController",modifypasswordController);
那里写错了求大神指点, 页面数据传出不过 展开
var modifypasswordController = function($scope, $http, LoginService) {
alert("1111");
$scope.save = function() {
alert("22222");
$scope.req = {
password:$scope.password,
password1:$scope.password1
};
alert($scope.req.password);
// $scope.req.agents_id = LoginService.agentid;
$scope.info();
};
$scope.info = function() {
$http.post("api/agent/modifyPassword",$scope.req).success(
function(data) {
alert("aasaa");
//$scope.info=data.message;
alert(data.message);
});
};
$scope.save();
};
modifypasswordController.$inject=[ '$scope','$http','LoginService' ];
modifypasswordModule.controller("modifypasswordController",modifypasswordController);
那里写错了求大神指点, 页面数据传出不过 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询