Introduction

In this article, I'm going to introduce AngularJs with a simple example. Angularjs is a JavaScript framework that is developed by Google.

Angularjs

Angularjs support the JavaScript MVW framework (Model View Whatever). It is a structural framework for dynamic web apps. It supports it to running with the single page application. The main goal of it is to develop a browser-based application with a model view controller(MVC).

AngularJS is a client-side technology that gives a way to use the powerful things that magnify HTML, CSS, and JavaScript. There is another approach is followed by the angularjs which minimizes the mismatch between the document HTML and what the application wants to create with new HTML. The directive used in the angularjs for teaching the browser new syntax by the construct:

MVW (Model View Whatever)

Actually, here the MVW means that there is no effect in angular js whatever software pattern is used in your app, So it is called MVW (Model View Whatever). The concept of the MVW is that there is all definitions of the module are associated with its name. All the modules depend on each other, and a single module brings other additional functionality on which that module is dependent. It gives the different sets of APIs for defining these modules and linking these modules through the dependency injection.

Directives in AngularJS

There are different directives that are used in the AngularJS:

Now we can see the simple example of angular js.

You need to download the AngularJS

Here we need to add a script of angulerJS as,

<!DOCTYPE html>
<html ng-app>

<head>
    <title>Simple Example of AngularJS</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</head>

<body>
    Type a Text in this Textbox
    <input type="text" ng-model="text" />
    <h1>Hi, {{text}}</h1>
</body>

</html>

Output

Display output of angularJS

Change text as the textbox text

Change text