Models with AngularJS
Models updating multiple parts of the view.
by Khalil Zhang
HTML
<h1>Simple Data Binding with AngularJS</h1>
<br />
<div ng-app>
Name: <input type="text" ng-model="person.name" />
<br /><br />
Welcome to AngularJS {{person.name}}
<br/>
Person: {{person.name}}
</div>
JavaScript
//No JavaScript needed aside from the reference to the AngularJS script.
//The HTML tab has all of the code for this demo