AngularJS extends HTML attributes with ng-directives.

The ng-app directive defines an AngularJS application.

The ng-model directive assigns the value of HTML controls ( select,input type='text', input type='textarea' etc...) to application data.

The ng-bind directive assigns application data to the HTML view.

Note: ng refers to angular.



<script src=""></script>


<div ng-app="">
  <p>Enter a Number: <input type="text" ng-model="number"></p><br/>You entered
  <p ng-bind="number"></p>

Note: The div which contains ng-app directive is considered as AngularJs application.

How to execute the ng-directives example?

copy the program ng-directives example code to a text file and convert the file to html file . Then open the HTML file.