| by Gagandeep Singh | No comments

Using Filters in AngularJS

As mentioned in the previous post, we use ng-repeat directive to iterate through a set of values. There may be certain scenarios in which we might need to pre-process the data below updating or displaying it on the page. For example, we might need to convert all the cities which we need to display on […]

Read More
| by Gagandeep Singh | No comments

Expressions in AngularJS

In our using Directives in AngularJS post we explained basics about the directives. Directives are used to add new attributes to the HTML tags. On the other Expressions in AngularJS are used for data-binding. The syntax used for data-binding is {{ }}. Let us consider the following example. Name: You wrote: {{ company }} In […]

Read More
| by Gagandeep Singh | No comments

Directives in AngularJS

HTML is used to created static pages, but AngularJS takes it one step ahead by providing functionality to add new attributes to the HTML tags. These attributes which AngularJS provides are called directives and they have a prefix ng-. Example.

Read More
| by Gagandeep Singh | No comments

Custom function to sort string array in JavaScript

JavaScript provides an inbuilt function sort() to sort the elements inside an array. For example. Let us consider the following array var numbers=[5,3,6,2,7,1]; We can easily sort it using sort() method. numbers.sort(); output – [1,2,3,5,6,7] Same will be case in case the arrays is made up of string elements. var str=[‘a’,’g’,’t’,’a’,’b’]; str.sort(); output – [ […]

Read More
| by Gagandeep Singh | No comments

Hello World in node.js

In our previous tutorial we explained what Node.js is. In this tutorial we will learn how to create a simple node.js program which will print some text on the screen. If you have properly installed nodejs which can be done from their site, then running this program should be an easy task. Step 1: Create a […]

Read More