angularjs的ng-model可以用函数吗?
4 回答
慕少森
TA贡献2019条经验 获得超9个赞
<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 关注
- 661 浏览
添加回答
举报
0/150
提交
取消