Introduction of AngularJs
Hi everyone in this article I’m explaining about AngularJs.
What is angularjs and why we use angularjs.
single page application (SPAs) project. It is extends HTML DOM with additional
attribute and make it more responsive to user action. Angular js is open source
completely free, and used by thousands of developer around the world. It is
licensed under the Apache license version 2.0.
What is Angularjs?
AngularJS is an open source web application framework. It
was originally developed in 2009 by Misko Hevery and Adam Abrons. It is now
maintained by Google. Its latest version is 1.3.14.
Angularjs is a structural framework for dynamic web
application. It lets you use HTML as your template language and lets you extend
HTML’s syntax to express your applications components clearly and succinctly.
Angular’s data binding and dependency injection eliminate much of the code you
currently have to write and it all happens within the browser, making it an
ideal partner with any server technology.
development framework to create RICH Internet Application (RIA).
Angularjs provides developers options to write
Application written in angularjs is
suitable for each browser.
Angularjs is open source, completely free and
used by thousands of developers around the world it is licensed under the
apache license version 2.0.
It is the automatic synchronization of data between model and view
These are object that refer to the model. They act as a glue between
controller and view.
Services: Angularjs come with several built-in
services for example $http to make an XMLHttpRequest. These are singleton
object which are instantiated only once in app.
These select a subset of items from an array and returns a new
Directives are markers on DOM elements (such as elements,
attributes, css etc). These can be used to create Custom HTML tag that serve as
new, custom widgets. Angularjs has built-in directives (ngBind, ngModel…).
These are the rendered view with information from the controller and model.
These can be a single file (like index.html) or multiple views in one page
It is concept of switching views.
View Whatever: MVC is a design pattern for dividing an application
into different parts (called Model, View and Controller), each with distinct
responsibilities. AngularJS does not implement MVC in the traditional sense,
but rather something closer to MVVM (Model-View-ViewModel). The Angular JS team
refers it humorously as Model View Whatever.
Linking: Deep linking allows you to encode the state of application
in the URL so that it can be bookmarked. The application can then be restored
from the URL to the same state.
Injection: Angularjs has built-in dependency injection subsystem
that helps the developer by making the application easier to develop,
understand and test.
Following diagram depicts some important parts of AngularJS
which we will discuss in detail in the subsequent chapters.
Advantage of Angularjs:
Angularjs provides capability to create single
page application in a very clean and maintainable way.
Angularjs provide data binding capability to
HTML thus giving user a rich and responsive experience.
Angularjs code is unit testable.
AngularJS uses dependency injection and make use
of separation of concerns.
AngularJS provides reusable components.
With AngularJS, developer write less code and
get more functionality.
In AngularJS, views are pure html pages, and
Disadvantages of AngulaJS:
Though AngularJS comes with lots of plus points but same
time we should consider the following points:
AngularJS are not safe. Server side authentication and authorization is must to
keep an application secure.
just see the basic page and nothing more.
The AngularJS Components:
The AngularJS framework can be divided into following three
: This directive defines and links an AngularJS application to HTML.
: This directive binds the values of AngularJS application data to
HTML input controls.
: This directive bins the AngularJS Application data to HTML tags.