http://docs.angularjs.org/api/ng/directive/ngModel


The ngModel directive binds an input,select,textarea (or custom form control) to a property on the scope using NgModelController, which is created and exposed by this directive.

 


In the example below the attribute ng-model defines a model called myName.

 

Example of use of ng-model

 

<!doctype html>

<html ng-app>

 <head>

  <script src="http://code.angularjs.org/1.2.0-rc.2/angular.min.js"></script>

 </head>

 

 <body style="font-family:Arial;">

    Type Something Here : <input ng-model="myName">

  <p >Hello {{myName}}!</p>

 </body>

</html>