我有以下的html:數據綁定不是在我的AngularJS應用工作
<!DOCTYPE HTML>
<html>
<head>
<title>Basic</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.js type="text/javascript">
</script>
</head>
<body>
<div ng-app="myApp">
<input ng-model="to" type="email"
placeholder="Recipient here.."/>
<textarea ng-model="emailBody"
placeholder="Email body here..">
</textarea>
<h2> {{ emailBody }} </h2>
</div>
</body>
</html>
我從TextArea引用emailBody數據,但它不綁定相關的數據。它只是從字面上輸入{{emailBody}}。
我在做什麼錯?
javascript在哪裏? – for3st 2014-10-22 01:44:45