AngularJS数据双向绑定

<body ng-app>
	<div ng-controller="myCtrl">
		<input ng-model="abc" type="text">
		<h1>{{abc}}</h1>
		<input ng-model="bind" type="text">
		<h1>{{bind}}</h1>
	</div>
	<script>
		function myCtrl($scope) {
			$scope.abc = '';
			$scope.bind = '';
		}
	</script>
</body>

  

posted @ 2016-12-08 12:02  HandsomeHan  阅读(155)  评论(0编辑  收藏  举报