首页 > 代码库 > select ipnut双向数据绑定用法

select ipnut双向数据绑定用法

   <script src="http://www.mamicode.com/angular-1.5.5/angular.min.js"></script>
</head>
<body ng-app="" ng-init="useName=‘小花猫‘ ;grader=‘17‘;grade=‘3‘">
{{useName}}
{{grader}}
<p ng-bind="grade"></p>
<p ng-bind="useName"></p>
<span ng-bind="grader"> </span>
<!--<input type="text" ng-model="useName"/>-->
<p>欢迎,<span ng-bind="useName"></span></p>
<label ng-model="uesName"></label>
<input type="text" ng-model="useName"/>
改变select
<select name="" id="" ng-model="grade">
<option value="http://www.mamicode.com/0">一年级</option>
<option value="http://www.mamicode.com/1">二年级</option>
<option value="http://www.mamicode.com/2">三年级</option>
<option value="http://www.mamicode.com/3">四年级</option>
</select>

select ipnut双向数据绑定用法