Node.js »

[15 Aug 2017 | No Comment]

This article shows how you can use routing in Node.js and Express Framework to create a Single Page Application (SPA) or website. Basically, we will be using Routing to include different HTML files.
Express Framework supports different HTTP request methods like GET, POST, PUT, DELETE, etc. Detailed guide on Express Routing is present here.

Node.js »

[8 Aug 2017 | No Comment]

This article show how you can use Embedded Javascript (EJS) in your Node.js & Express application. EJS is an open-source Javascript Template Library.
There are different other Javascript Templating languages/libraries like Mustache, Pug, Jade, etc. which can also be used in your Node.js & Express application. This tutorial uses EJS as the templating language for our Node & Express example app.

Node.js »

[3 Aug 2017 | No Comment]

This article shows how you can use Express Framework for creating Web based Application in Node.js.
Express is a free and open-source Node.js web application framework.

Node.js »

[30 Jul 2017 | No Comment]

This article shows how you can package your Node.js module or project using npm init command. Running this command will create a package.json file which contains all the necessary packaging information.
Here’s a step-by-step guide to create package file with npm init command.

Node.js »

[25 Jul 2017 | No Comment]

This article shows how you can create a basic HTTP routing in Node.js.
In the example code, we will be using two built-in Node.js modules: http module and fs module. To create HTTP server, we need http module. And, to read/write file data, we need to use fs module.
We will create an http server and write if/else conditions to read HTML files according to routing parameter.

Node.js »

[20 Jul 2017 | No Comment]

Node.js is an open-source runtime environment, used to build server-side and networking application using Javascript. Generally, Javascript has been used for client-side scripting. However, with Node.js, you can interact with web-server using Javascript. The APIs of Node.js are asynchronous and event-driven which helps in faster code execution.
Here’s the installation instruction for Node.js.

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.