ng-model directive
ng-model directive is used to bind input from view to model.
ng-bind directive
ng-bind directive is used to replace value in text area
Example
- <!DOCTYPE html>
- <html>
- <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
- <body>
-
- <div ng-app>
-
- <h3>Enter a name</h3>
- <p>Yourname: <input type="text" ng-model="yourname"></p>
- <p ng-bind="yourname"></p>
-
- </div>
-
- </body>
- </html>