猿问

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

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


蛊毒传说
浏览 692回答 4
4回答

慕桂英3389331

<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

相关分类

AngularJS
我要回答