2014-03-20 16:46:31 -07:00
|
|
|
|
AngularJS [](https://travis-ci.org/angular/angular.js)
|
2012-01-05 19:54:42 -08:00
|
|
|
|
=========
|
|
|
|
|
|
|
2012-12-11 20:57:41 +11:00
|
|
|
|
AngularJS lets you write client-side web applications as if you had a smarter browser. It lets you
|
2016-10-30 02:21:41 -07:00
|
|
|
|
use good old HTML (or HAML, Jade/Pug and friends!) as your template language and lets you extend HTML’s
|
2012-07-02 08:19:14 -07:00
|
|
|
|
syntax to express your application’s components clearly and succinctly. It automatically
|
|
|
|
|
|
synchronizes data from your UI (view) with your JavaScript objects (model) through 2-way data
|
2012-12-11 20:57:41 +11:00
|
|
|
|
binding. To help you structure your application better and make it easy to test, AngularJS teaches
|
2014-09-18 21:10:21 -07:00
|
|
|
|
the browser how to do dependency injection and inversion of control.
|
|
|
|
|
|
|
2017-04-03 13:49:35 +05:30
|
|
|
|
It also helps with server-side communication, taming async callbacks with promises and deferred objects,
|
|
|
|
|
|
and it makes client-side navigation and deep linking with hashbang urls or HTML5 pushState a
|
2015-10-29 19:42:45 -06:00
|
|
|
|
piece of cake. Best of all? It makes development fun!
|
|
|
|
|
|
|
2018-02-21 08:33:28 +00:00
|
|
|
|
--------------------
|
|
|
|
|
|
|
2018-09-10 14:02:40 +05:30
|
|
|
|
**On July 1, 2018 AngularJS entered a 3 year Long Term Support period:** [Find out more](https://docs.angularjs.org/misc/version-support-status)
|
2018-02-21 08:33:28 +00:00
|
|
|
|
|
2018-09-10 14:02:40 +05:30
|
|
|
|
**Looking for the new Angular? Go here:** https://github.com/angular/angular
|
2018-02-21 08:33:28 +00:00
|
|
|
|
|
|
|
|
|
|
--------------------
|
|
|
|
|
|
|
2015-10-29 19:42:45 -06:00
|
|
|
|
* Web site: https://angularjs.org
|
|
|
|
|
|
* Tutorial: https://docs.angularjs.org/tutorial
|
|
|
|
|
|
* API Docs: https://docs.angularjs.org/api
|
|
|
|
|
|
* Developer Guide: https://docs.angularjs.org/guide
|
2017-11-03 12:41:54 +01:00
|
|
|
|
* Contribution guidelines: [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
|
|
|
|
* Core Development: [DEVELOPERS.md](DEVELOPERS.md)
|
2015-10-29 19:42:45 -06:00
|
|
|
|
* Dashboard: https://dashboard.angularjs.org
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-03 12:41:54 +01:00
|
|
|
|
Documentation
|
|
|
|
|
|
--------------------
|
|
|
|
|
|
Go to https://docs.angularjs.org
|
2012-01-05 19:54:42 -08:00
|
|
|
|
|
2017-11-03 12:41:54 +01:00
|
|
|
|
Contribute
|
|
|
|
|
|
--------------------
|
2010-03-15 14:41:28 -07:00
|
|
|
|
|
2017-11-03 12:41:54 +01:00
|
|
|
|
We've set up a separate document for our
|
|
|
|
|
|
[contribution guidelines](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md).
|
2015-10-29 19:42:45 -06:00
|
|
|
|
|
2017-11-03 12:41:54 +01:00
|
|
|
|
Develop
|
2015-10-29 19:42:45 -06:00
|
|
|
|
--------------------
|
|
|
|
|
|
|
2017-11-03 12:41:54 +01:00
|
|
|
|
We've set up a separate document for
|
|
|
|
|
|
[developers](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md).
|
2014-01-01 20:41:55 -08:00
|
|
|
|
|
2014-01-01 20:51:45 -08:00
|
|
|
|
|
2014-01-01 20:41:55 -08:00
|
|
|
|
[](https://github.com/igrigorik/ga-beacon)
|
|
|
|
|
|
|
2016-02-15 22:01:49 +02:00
|
|
|
|
What to use AngularJS for and when to use it
|
2016-02-07 14:37:47 +05:30
|
|
|
|
---------
|
2016-09-16 14:29:27 -04:00
|
|
|
|
AngularJS is the next generation framework where each component is designed to work with every other
|
|
|
|
|
|
component in an interconnected way like a well-oiled machine. AngularJS is JavaScript MVC made easy
|
|
|
|
|
|
and done right. (Well it is not really MVC, read on, to understand what this means.)
|
2016-02-07 14:37:47 +05:30
|
|
|
|
|
|
|
|
|
|
#### MVC, no, MV* done the right way!
|
2016-09-16 14:29:27 -04:00
|
|
|
|
MVC, short for Model-View-Controller, is a design pattern, i.e. how the code should be organized and
|
|
|
|
|
|
how the different parts of an application separated for proper readability and debugging. Model is
|
|
|
|
|
|
the data and the database. View is the user interface and what the user sees. Controller is the main
|
|
|
|
|
|
link between Model and View. These are the three pillars of major programming frameworks present on
|
|
|
|
|
|
the market today. On the other hand AngularJS works on MV*, short for Model-View-_Whatever_. The
|
|
|
|
|
|
_Whatever_ is AngularJS's way of telling that you may create any kind of linking between the Model
|
|
|
|
|
|
and the View here.
|
|
|
|
|
|
|
|
|
|
|
|
Unlike other frameworks in any programming language, where MVC, the three separate components, each
|
|
|
|
|
|
one has to be written and then connected by the programmer, AngularJS helps the programmer by asking
|
|
|
|
|
|
him/her to just create these and everything else will be taken care of by AngularJS.
|
2016-02-07 14:37:47 +05:30
|
|
|
|
|
|
|
|
|
|
#### Interconnection with HTML at the root level
|
2016-09-16 14:29:27 -04:00
|
|
|
|
AngularJS uses HTML to define the user's interface. AngularJS also enables the programmer to write
|
|
|
|
|
|
new HTML tags (AngularJS Directives) and increase the readability and understandability of the HTML
|
|
|
|
|
|
code. Directives are AngularJS’s way of bringing additional functionality to HTML. Directives
|
|
|
|
|
|
achieve this by enabling us to invent our own HTML elements. This also helps in making the code DRY
|
|
|
|
|
|
(Don't Repeat Yourself), which means once created, a new directive can be used anywhere within the
|
|
|
|
|
|
application.
|
|
|
|
|
|
|
|
|
|
|
|
HTML is also used to determine the wiring of the app. Special attributes in the HTML determine where
|
|
|
|
|
|
to load the app, which components or controllers to use for each element, etc. We specify "what"
|
|
|
|
|
|
gets loaded, but not "how". This declarative approach greatly simplifies app development in a sort
|
|
|
|
|
|
of WYSIWYG way. Rather than spending time on how the program flows and orchestrating the various
|
2017-01-24 17:23:54 +00:00
|
|
|
|
moving parts, we simply define what we want and AngularJS will take care of the dependencies.
|
2016-02-07 14:37:47 +05:30
|
|
|
|
|
|
|
|
|
|
#### Data Handling made simple
|
2016-09-16 14:29:27 -04:00
|
|
|
|
Data and Data Models in AngularJS are plain JavaScript objects and one can add and change properties
|
|
|
|
|
|
directly on it and loop over objects and arrays at will.
|
2016-02-07 14:37:47 +05:30
|
|
|
|
|
|
|
|
|
|
#### Two-way Data Binding
|
2016-09-16 14:29:27 -04:00
|
|
|
|
One of AngularJS's strongest features. Two-way Data Binding means that if something changes in the
|
|
|
|
|
|
Model, the change gets reflected in the View instantaneously, and the same happens the other way
|
|
|
|
|
|
around. This is also referred to as Reactive Programming, i.e. suppose `a = b + c` is being
|
|
|
|
|
|
programmed and after this, if the value of `b` and/or `c` is changed then the value of `a` will be
|
|
|
|
|
|
automatically updated to reflect the change. AngularJS uses its "scopes" as a glue between the Model
|
|
|
|
|
|
and View and makes these updates in one available for the other.
|
2016-02-07 14:37:47 +05:30
|
|
|
|
|
2016-02-16 22:11:29 +05:30
|
|
|
|
#### Less Written Code and Easily Maintainable Code
|
2016-09-16 14:29:27 -04:00
|
|
|
|
Everything in AngularJS is created to enable the programmer to end up writing less code that is
|
|
|
|
|
|
easily maintainable and readable by any other new person on the team. Believe it or not, one can
|
|
|
|
|
|
write a complete working two-way data binded application in less than 10 lines of code. Try and see
|
|
|
|
|
|
for yourself!
|
2016-02-07 14:37:47 +05:30
|
|
|
|
|
|
|
|
|
|
#### Testing Ready
|
2016-09-16 14:29:27 -04:00
|
|
|
|
AngularJS has Dependency Injection, i.e. it takes care of providing all the necessary dependencies
|
|
|
|
|
|
to its controllers and services whenever required. This helps in making the AngularJS code ready for
|
|
|
|
|
|
unit testing by making use of mock dependencies created and injected. This makes AngularJS more
|
|
|
|
|
|
modular and easily testable thus in turn helping a team create more robust applications.
|