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.

Example:

<html>

<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
</head>

<body>

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

</body>
</html>
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.