Angular JS is an open source framework built over JavaScript. It can be added to an HTML page with a <script> tag. Angular JS extends HTML attributes with Directives, and binds data to HTML with Expressions and it was built by the developers at Google.

Example

<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>

<div ng-app>

<p>Enter your login and password:</p>
<p>Login: <input type="text" ng-model="login"></p>
<p>Password: <input type="password" ng-model="password"></p>
<p ng-bind="login"></p>
<p ng-bind="password"></p>
</div>

</body>
</html>

In above program we have called it in the < script > tag and used three directives ng-app, ng-model and ng-bind.

We can only have one ng-app directive in our HTML document. It is also used to load various Angular JS modules in Angular JS Application. The AngularJ S framework will only process the DOM elements and its child elements where the ng-app directive is applied.

The ng-model directive binds the value of the input fields to the application variable login and password.

The ng-bind directive binds the innerHTML of the < p > element to the application variable login and password and display these value on the page.