Please enable Javascript for better experience...
Set up your angular js application with node.js
By Rahul Kumar Jha | Sep 13, 2016 | In Articles | Update: Aug 2, 2017 | Total Views [ 2508 ]
Taged In
(0 Like)

This article explains how to set up an angular js project using node.js.


To set up your angular js project using node js, make sure node js is installed on your system with other required components like ruby, python, git etc. These components can be installed as per your project requirement. You also need an IDE like WebStorm, Visual Studio Code to start your development.

Setting up your project

Follow below steps to set up your first angular js application:

1) Create a folder and double click on it. Right click on blank area pressing shift key. A popup will show up. Click on Open command window here. You can simply click on navaigation bar and write "cmd" to open command window.

2) A command window will open with a path of your project. Write npm init command and press enter.

3) Command will start creating package.json file which contains project details and its dependencies information.

4) You will be walk through an utility. This utility also has default values. Enter desired values or left blank to use default entries. Press enter when needed.

5) At the end of the utility, it will preview the package.json file created so far. Press enter if you are done or start again.

6) You will find a package.json file is created in your application folder.

7) Now it is the time to add dependencies to package.json file. Write npm install DependencyName --save command to add dependencies and save it to package.json file i.e. npm install angular --save to install angular js dependency. You can add particular version using command npm install DependencyName@version --save i.e. npm install angular@1.2.28 --save.

You can add angular ui router dependency as npm install angular-ui-router --save.

8) This is your package.json after adding angular dependency. You can add other dependencies also as per your requirement like "angular-route", "angular-message" etc.

9) Once you installed all your dependencies through npm command, now it is turn to add bower component to your application. You can install bower component using bower init command.

10) This command will generate bower.json file which contains your project related dependencies.

package.json and bower.json are the part of node which contains dependencies and other information about your project. You should add your custom dependencies in bower.json file and dependencies like angular, ui-router in package.json file.

Hope it helps you. Please be connected for more articles.

Share this

About the Author

Rahul Kumar Jha
Rahul Kumar Jha
Founder, Developer

Public profile: user/profile/99900001

Has working experience in different phases of Software Development Life Cycle (SDLC) in CMS, Gaming, Health Care and Financial Services domain using Agile pattern. Working experience in Design patterns, ASP.NET, MVC, ANGULAR, ANGULAR JS, Windows application, WCF, ADO.NET, SQL Server and Test Driven Development (TDD) environment with JQuery, JavaScript, N-Unit, Entity Frameworks, LINQ, Code Refactoring and Business Objects Models.

User's Comments

Please SignUp/Login to comment...

Or comment as anonymous...
* Name
* Email ID