- WatchAngularJS tutorial - What is AngularJS
- WatchAngular modules and controllers
- WatchControllers in AngularJS
- WatchAngularJS ng src directive
- WatchTwo way databinding in AngularJS
- WatchAngularJS ng repeat directive
- WatchHandling events in AngularJS
- WatchAngularJS filters
- WatchSorting data in AngularJS
- WatchAngularJS sort rows by table header
- WatchSearch filter in AngularJS
- WatchAngularjs filter by multiple properties
- WatchCreate a custom filter in AngularJS
- Watchng hide and ng show in AngularJS
- WatchAngularJS ng init directive
- Watchng include directive in AngularJS
- WatchConsuming ASP NET Web Service in AngularJS using $http
- Watch$http service in AngularJS
- WatchAngularJS Services
- WatchCreate custom service in AngularJS
- WatchAngularJS anchorscroll example
- WatchAngular anchorscroll with database data
- WatchAngularJS routing tutorial
- WatchAngular layout template
- WatchAngularjs partial templates
- WatchAngularjs route configuration
- WatchRemove # from URL AngularJS
- WatchAngularJS default route
- WatchAngularJS intellisense in visual studio
- WatchAngularJS routeparams example
- WatchAngularJS page refresh problem
- WatchAngularJS controller as syntax
- WatchAngular nested scopes and controller as syntax
- WatchAngularJS controller as vs scope
- WatchAngularJS caseInsensitiveMatch and Inline Templates
- WatchAngularJS route reload
- WatchDifference between $scope and $rootScope
- WatchAngularJS cancel route change
- WatchAngularJS route change events
- WatchAngularJS optional url parameters
- WatchAngularJS route resolve
- WatchAngularJS ui router tutorial
- Watchangularjs ui router configuring states
- WatchAngularJS ui router parameters
- WatchAngularJS ui router optional parameters
- WatchCase sensitivity with angularjs ui router
- WatchAngular ui router default route
- WatchAngularJS ui router custom data
- WatchAngularJS ui router html5mode
- Watchui router active state css
AngularJS – Overview
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.4.3.
Definition of AngularJS as put by its official documentation is as follows −
AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML’s syntax to express your application’s 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.
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.
Overall, AngularJS is a framework to build large scale and high performance web application while keeping them as easy-to-maintain.
Following are most important core features of AngularJS −
Data-binding − It is the automatic synchronization of data between model and view components.
Scope − These are objects 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 a XMLHttpRequests. These are singleton objects which are instantiated only once in app.
Filters − These select a subset of items from an array and returns a new array.
Directives − Directives are markers on DOM elements (such as elements, attributes, css, and more). These can be used to create custom HTML tags that serve as new, custom widgets. AngularJS has built-in directives (ngBind, ngModel…)
Templates − 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 using “partials”.
Routing − It is concept of switching views.
Model 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.
Deep 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.
Dependency Injection − AngularJS has a 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.
Advantages of AngularJS
AngularJS provides capability to create Single Page Application in a very clean and maintainable way.
AngularJS provides 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.
On top of everything, AngularJS applications can run on all major browsers and smart phones including Android and iOS based phones/tablets.
Disadvantages of AngularJS
Though AngularJS comes with lots of plus points but same time we should consider the following points −
The AngularJS Components
The AngularJS framework can be divided into following three major parts −
ng-app − This directive defines and links an AngularJS application to HTML.
ng-model − This directive binds the values of AngularJS application data to HTML input controls.
ng-bind − This directive binds the AngularJS Application data to HTML tags.