Home » Blog » General » Angular JS Tutorial

Angular JS Tutorial

posted in: General 0

Introduction:

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

AngularJs is supported to MVVM and stands for Model-View-View Model. It’s also known as MV*. The (*) means “anything you need to do.”

AngularJS Advantages
If we use angularjs in our applications we have the subsequent advantages.

  • Less Coding
  • More Extensive UI
  • Developed by way of Google Inc

AngularJS Features
The following are the capabilities of angularjs.

1. Two-way statistics 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 no longer a library like jQuery etc. And it does not rely on jQuery instead, it’ll use jQLite.
The key motives to apply AngularJs as given below.

1. Supported to two-way statistics binding
2. Write Less code
3. Scope inheritable
4. DOM manipulations5. Partial Views
6. Easy to used Routes
7. Extensible declarative UI
8. Create custom directives very clean
9. Filters Flexibility
10. Supported to REST communication

How to use AngularJs?
Before You Start AngularJs, observe the smooth steps. The steps as given belows.

Need to installed plug-ins
Manually we will download AngularJs framework from angularjs site https://angularjs.org/ or we willencompass following CDN in header segment of our application to apply 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

3. Getting started with an AngularJs Applications
Setup Angularjs Environment for Development

Now allow us understand what it incorporates and what they stand for actually

Branch – This tells approximately the version as this is easy to recognize from what is written there. 1.3. X is the stable version of the AngularJS framework and 1.4.X is the ultra-modern one.
Build – This tells approximately in which format we will download the AngularJs library i.E. Minified, Uncompressed or Zip.
CDN – CDN basically stands for Content Delivery Network which provides the ability to host your files (static files) on distributed servers as opposed to hosting them on a unmarried server. There is a number of free CDN’s are supplied by using specific vendors like Microsoft, Google, etc. One benefit of using CDN here is, there may be no want to make greater calls to server if you have already loaded AngularJs to your browser earlier. It will use the cached one. You can get more statistics on the internet about what is CDN and the blessings of the usage of CDN.
Bower – This command-based technique to add AngularJs, first installation bower to your machine the usage of “$ npm installation -g bower” (supposing you have already got installed npm). And then get AngularJs by the given command “bower set up angular#1.3.14”.Npm- or you could effortlessly use the npm command to add AngularJs.