请问angularjs的ng-model可以用函数吗?

angularjs的ng-model可以用函数吗?


森林海
浏览 662回答 4
4回答

慕少森

<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;}])
打开App,查看更多内容
随时随地看视频慕课网APP