- Notifications
You must be signed in to change notification settings - Fork27.4k
AngularJS - HTML enhanced for web apps!
License
angular/angular.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
AngularJS lets you write client-side web applications as if you had a smarter browser. It lets youuse good old HTML (or HAML, Jade/Pug and friends!) as your template language and lets you extend HTML’ssyntax to express your application’s components clearly and succinctly. It automaticallysynchronizes data from your UI (view) with your JavaScript objects (model) through 2-way databinding. To help you structure your application better and make it easy to test, AngularJS teachesthe browser how to do dependency injection and inversion of control.
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 apiece of cake. Best of all? It makes development fun!
AngularJS support has officially ended as of January 2022.See what ending support meansandread the end of life announcement.
Visitangular.io for the actively supported Angular.
- 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
- Contribution guidelines:CONTRIBUTING.md
- Core Development:DEVELOPERS.md
- Dashboard:https://dashboard.angularjs.org
Go tohttps://docs.angularjs.org
We've set up a separate document for ourcontribution guidelines.
We've set up a separate document fordevelopers.
AngularJS is the next generation framework where each component is designed to work with every othercomponent in an interconnected way like a well-oiled machine. AngularJS is JavaScript MVC made easyand done right. (Well it is not really MVC, read on, to understand what this means.)
MVC, short forModel-View-Controller, is a design pattern, i.e. how the code should be organized and how thedifferent parts of an application separated for proper readability and debugging. Model is the dataand the database. View is the user interface and what the user sees. Controller is the main linkbetween Model and View. These are the three pillars of major programming frameworks present on themarket today. On the other hand AngularJS works on MV*, short for Model-View-Whatever. TheWhatever is AngularJS's way of telling that you may create any kind of linking between the Modeland the View here.
Unlike other frameworks in any programming language, where MVC, the three separate components, eachone has to be written and then connected by the programmer, AngularJS helps the programmer by askinghim/her to just create these and everything else will be taken care of by AngularJS.
AngularJS uses HTML to define the user's interface. AngularJS also enables the programmer to writenew HTML tags (AngularJS Directives) and increase the readability and understandability of the HTMLcode. Directives are AngularJS’s way of bringing additional functionality to HTML. Directivesachieve 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 theapplication.
HTML is also used to determine the wiring of the app. Special attributes in the HTML determine whereto 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 sortof WYSIWYG way. Rather than spending time on how the program flows and orchestrating the variousmoving parts, we simply define what we want and AngularJS will take care of the dependencies.
Data and Data Models in AngularJS are plain JavaScript objects and one can add and change propertiesdirectly on it and loop over objects and arrays at will.
One of AngularJS's strongest features. Two-way Data Binding means that if something changes in theModel, the change gets reflected in the View instantaneously, and the same happens the other wayaround. This is also referred to as Reactive Programming, i.e. supposea = b + c
is beingprogrammed and after this, if the value ofb
and/orc
is changed then the value ofa
will beautomatically updated to reflect the change. AngularJS uses its "scopes" as a glue between the Modeland View and makes these updates in one available for the other.
Everything in AngularJS is created to enable the programmer to end up writing less code that iseasily maintainable and readable by any other new person on the team. Believe it or not, one canwrite a complete working two-way data binded application in less than 10 lines of code. Try and seefor yourself!
AngularJS has Dependency Injection, i.e. it takes care of providing all the necessary dependenciesto its controllers and services whenever required. This helps in making the AngularJS code ready forunit testing by making use of mock dependencies created and injected. This makes AngularJS moremodular and easily testable thus in turn helping a team create more robust applications.
About
AngularJS - HTML enhanced for web apps!