Simple form binding in Angular
by manoj
HTML
<div ng-app="MyApp">
<h4>Simple form binding</h4>
<div ng-controller="MyCtrl">
<form name="simpleForm">
<p>Name
<input type="text" required ng-model="user.Name" />
</p>
<p>Email
<input type="email" ng-model="user.Email" />
</p>
<p>Telephone
<input type="tel" ng-model="user.Phone" />
</p>
</form> <b>Form Data</b>
<pre><span ng-bind="user|json"></span></pre>
</div>
</div>
JavaScript
var myApp = angular.module("MyApp", []);
myApp.controller("MyCtrl", ['$scope', function (s) {
}]);