Introduction to AngularJS with Examples

Here we will learn what is angularjs, why we need angularjs and how to use angularjs in the application.

What is AngularJs?

AngularJs is an MVVM framework and that help us to create Single Page Applications (SPA) and dynamic web apps. AngularJS will be maintained and developed by Google Inc.  

 

AngularJs is supported to MVVM and stands for Model-View-Whatever. It's also known as MV*. The (*) means "whatever you want to do...”.

AngularJS Advantages

If we use angularjs in our applications we have the following advantages.

 
                   1. Less Coding


                   2. More Extensive UI


                   3. Developed by Google Inc

AngularJS Features

The following are the features of angularjs.

 

                 1. Two-way data binding


                 2. MVC pattern


                 3. Template and Custom directive


                 4. Server Communication and REST friendly


                 5. dynamic page Linking


                 6. Validations


                 7. Dependency injection

 

The angularjs uses prefix “ng" for data binding and it handles all the DOM and AJAX requests easily.

Why do we need to use AngularJs?

AngularJs is a framework not a library like jQuery etc. and it does not depend on jQuery instead, it will use jQLite.

 

The key reasons to use AngularJs as given below.

 

            1. Supported to two-way data binding


            2. Write Less code


            3. Scope inheritable


            4. DOM manipulations


            5. Partial Views


            6. Easy to used Routes


            7. Extensible declarative UI


            8. Create custom directives very easy


            9. Filters Flexibility


            10. Supported to REST communication

How to use AngularJs?

Before You Start AngularJs, follow the easy steps. The steps as given bellows.

 

1. Need to installed plug-ins

             

Manually we can download AngularJs framework from angularjs site http://angularjs.org/ or we can include following CDN in header section of our application to use angularjs

 

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

2. Need to Understand basic overviews

 

             a. ngApp

 

             b. ng-controller

 

             c. ngModule etc.

 

3. Getting started with an AngularJs Applications

Topics Covered