angularjs怎么獲得ng-model里的value
2 回答

鳳凰求蠱
TA貢獻(xiàn)1825條經(jīng)驗(yàn) 獲得超4個(gè)贊
<div class="page-content" ng-app="Example" ng-controller="ExampleCtr">
<input type="text" id="keyWords" ng-model="pageModel.keyWords" class="form-control" placeholder="請(qǐng)輸入關(guān)鍵詞" />
</div>
.controller("ExampleCtr", [ '$scope', "httpServer", function ($scope, httpServer) {
$scope.pageModel = {
keyWords: ""
};
var value = $scope.pageModel.keyWords;
}])
- 2 回答
- 0 關(guān)注
- 470 瀏覽
添加回答
舉報(bào)
0/150
提交
取消