Category Archives: AngularJS

AngularJS Filters

Filters can be added to expressions and directives using a pipe character. AngularJS filters can be used to transform data: Filter Description currency : Format a number to a currency format. filter : Select a subset of items from an array. lowercase : Format a string to lower case. orderBy : Orders an array by… Read More »

AngularJS Controllers

AngularJS controllers control the data of AngularJS applications. AngularJS controllers are regular JavaScript Objects. AngularJS applications are controlled by controllers. The ng-controller directive defines the application controller. A controller is a JavaScript Object, created by a standard JavaScript object constructor. Example <div ng-app=”myApp” ng-controller=”myCtrl”> First Name: <input type=”text” ng-model=”firstName”> Last Name: <input type=”text” ng-model=”lastName”> Full… Read More »

AngularJS Expressions

AngularJS expressions are written inside double braces: {{ expression }}. AngularJS expressions binds data to HTML the same way as the ng-bind directive. AngularJS will “output” data exactly where the expression is written. AngularJS expressions are much like JavaScript expressions: They can contain literals, operators, and variables. Example {{ 5 + 5 }} or {{… Read More »

AngularJS – Directives

AngularJS directives are used to extend HTML. These are special attributes starting with ng- prefix. We’re going to discuss following directives − ng-app − This directive starts an AngularJS Application. ng-init − This directive initializes application data. ng-model − This directive defines the model that is variable to be used in AngularJS. ng-repeat − This… Read More »

Start learning AngularJS

In this chapter we will discuss about how to set up AngularJS library to be used in web application development. We will also briefly study the directory structure and its contents. AngularJS is a JavaScript framework. It is a library written in JavaScript. AngularJS is distributed as a JavaScript file, and can be added to… Read More »