angularjs怎么获得ng-model里的value
2 回答
森栏
TA贡献1810条经验 获得超5个赞
<div class="page-content" ng-app="Example" ng-controller="ExampleCtr">
<input type="text" id="keyWords" ng-model="pageModel.keyWords" class="form-control" placeholder="请输入关键词" />
</div>
.controller("ExampleCtr", [ '$scope', "httpServer", function ($scope, httpServer) {
$scope.pageModel = {
keyWords: ""
};
var value = $scope.pageModel.keyWords;
}])
- 2 回答
- 0 关注
- 1112 浏览
添加回答
举报
0/150
提交
取消