angularjs的ng-model可以用函数吗?
4 回答
慕桂英3389331
TA贡献2036条经验 获得超8个赞
<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;
}])
- 4 回答
- 0 关注
- 691 浏览
添加回答
举报
0/150
提交
取消