Node.js

Sending iCal invite using Node Js

Sending event invites through an email is a common use case nowadays in applications. In this blog, we will briefly cover the steps to accomplish this using Node.js. Node.js provide various npm modules for sending iCal invite. We have customized one of the modules and used it according to our use case. You can find the module here . ...

by Sakshi Tyagi
Tag: javascript
12-Jun-2015

AngularJS, Front End Development

Angular’s $resource for CRUD Operations

$resouce is a perfect option to create a single page application which involve CRUD operations.You don't write your CRUD methods (create,read,update and delete) when you use it. A RESTful web service with one endpoint for a data type that does different things with that data type based on HTTP methods like GET, POST, PUT, DELETE,...

by Rubi Saini
Tag: javascript
30-May-2015

Grails

Adding interactive charts to web pages using Highcharts

I recently had to add charts to a web page in my project. I used Highcharts library for this. It is very dynamic allowing you to change graphs even after the chart has been drawn. To display a graph we need a div with an ID. Let's say we have div with ID "chartDivId" and we want to display two lines in the chart. We can use the...

by Aseem Bansal
Tag: javascript
26-May-2015

Automation Testing

Connect to PostgreSQL using JavaScript

One of the best practices of Automation testing is to leave the system from the state where you started your test from. While doing functional testing for an angularjs application using Protractor and Cucumber (BDD framework), there was a need to clean up whatever data was being generated in the Data setup (generally the Given) of the...

by Anuj Verma
Tag: javascript
20-May-2015

Node.js

Configurable Service in AngularJS

Angular provide services for handling non-view logic, communication with server(back-end) and can holds data & state. These services are singleton objects that can be used to share and organize code. For doing so, angular provides us five cool ways to make a service on the bases of once need. Following are the five approaches that...

by Vibhor Kukreja
Tag: javascript
30-Mar-2015

Node.js

Handlebars : A step ahead

In the previous blog on Handlebars, we learnt the basic concept of handlebars and how to use them in your web applications. Now we will extend our knowledge, a bit more and see how we can use and create helper methods in handlebars to have more flexibility on data. Predefined/Built-in Helper methods: There are a number of built in...

by Rishabh Dixit
Tag: javascript
18-Mar-2015

Grails

Vertical Labels with Google Chart API

While working with Google charts, we usually face issues with long labels on the horizontal axis. The chart displays well, however the X-axis labels are not completely visible and displays the numbers like this: 24/3.. 25/3.. 26/3.. 27/3.. 28/3.. 30/3.. 31/3.. instead of 24/3/2006, 25/3/2006, 6/3/2006, 27/3/2006, 28/3/2006,...

by Mansi Arora
Tag: javascript
20-Feb-2015

Node.js

Form Validations using AngularJs

There are lots of ways to validate a web page like HTML5 validations, but why not do it in a better interactive way by using AngularJS. AngularJS provides us with several form properties for validation, which helps in providing instant feedback in case validation is violated.     $valid: return true when input field is valid.  ...

by Sandeep Kumar
Tag: javascript
19-Feb-2015

Technology

JavaScript : String.slice() vs String.substring() vs String.substr()

In this blog, we will discuss about few methods that are used in JavaScript for partial string extraction. You can also see my blog specific on Arrays which are used in JavaScript. The following methods are :- slice() substring() substr() All these methods extracts parts of a string and returns the extracted parts in a...

by Vivek Garg
Tag: javascript
19-Feb-2015

Technology

JavaScript : Array.splice() vs Array.slice()

1. The splice() method returns the removed item(s) in an array and slice() method returns the selected element(s) in an array, as a new array object. 2. The splice() method changes the original array and slice() method doesn't change the original array. 3. The splice() method can take n number of arguments: Argument 1: Index,...

by Vivek Garg
Tag: javascript
18-Feb-2015

Node.js

Highlighting links in text using “linky” filter

At times we come across few cases where we need to differentiate the links amongst the plain text. Angular provide us with a very useful filter named : "linky" which help us to do so. With the help of linky filter we can detect links from text and show them differently .  Linky takes text and produces HTML by wrapping all...

by Rubi Saini
Tag: javascript
13-Feb-2015

Node.js

High performance find query using lean() in mongoose

Lets start with a basic find query in mongoose and observe its execution time. [js] Event.find({'schedule.closing': {'$gte': +new Date()}}, {}, {limit:20, skip:0} ).exec(function (err, events){ ........ ........ } ); [/js] In my last project on Nodejs, I have used the above query to fetch the events...

by Sakshi Tyagi
Tag: javascript
13-Feb-2015