Home » Archive

Articles in the AngularJS Category

AngularJS »

[17 Jul 2017 | Comments Off on AngularJS: Routing & Single Page Application (SPA)]

This article shows how you can use routing in AngularJS 1.x and create Single Page Application (SPA).
For routing feature, we need to include angular-route Javascript file and use ngRoute dependency in our AngularJS module. ngRoute module provides the $routeProvider API which has when and otherwise functions used for routing.

AngularJS »

[13 Jul 2017 | Comments Off on AngularJS: Search & Sort Data]

This article shows how you can search and sort data using AngularJS 1.x.
We will be using code from previous article example. Our code contains country & their capitals name as an array and we display them using ng-repeat directive in HTML view.
This is our example code from previous article:

AngularJS »

[10 Jul 2017 | Comments Off on AngularJS: Working with JSON Data & HTTP Service]

This article shows an example on how you can fetch JSON data from external file.
First, let’s create an example of inline JSON data inside the controller.
In the below code, in countryController, we have countries array containing country and capital name. In the HTML view, we have used ng-repeat directive to loop through the countries array and print the country name and capital name.

AngularJS »

[6 Jul 2017 | Comments Off on AngularJS: Dependency Injection (DI)]

This article shows how you can work with Dependency Injection (DI) in AngularJS 1.x application. It’s just about passing dependencies to AngularJS controller. Rest of the work on injecting dependencies is taken care by AngularJS.
Dependency Injection (DI) is basically about passing a dependency object to another dependent object that uses it as a service. A service is provided to the client as a dependency object. So that, the client does not have to create the service by itself.

AngularJS »

[3 Jul 2017 | One Comment]

This article presents a basic introduction to AngularJS 1.x. AngularJS is a free and open source Javascript Framework. It’s a frontend web application framework maintained by Google.
AngularJS follows the MVC (Model View Controller) approach of coding. Two way data-binding is a prominent feature of AngularJS which automatically synchronizes data between model and view components. This allows automatic updates in model whenever view changes and vice-versa. There are other great features like Dependency Injection, Services, Filters, Directives, etc.