Brief of Angular CLI
The Angular CLI is a command line interface tool that can be used to create our Angular project very easily and it is also used to perform a variety of ongoing development tasks such as testing, bundling, and deployment in our same project.
Note
We can also create an Angular project without using Angular cli, if you wish to take a look, here is the link for that,
Step by step Installation Process
Prerequisite
Download visual studio code from this URL.
Just FYI
If you are 32bit user, then click link like below in the visual studio.com to start the download

Once you've downloaded exe, double click that to run

Then follow the simple instructions to install. Once installed successfully follow the below steps,
Step 1 Install node and npm
To install node, go to this URL
And download the exe depend on your operating system configuration.
Once downloaded, double click the exe and follow the simple instruction. Below are the samples screens for better guidance
Sample screen shots for Node Installation,
After clicked some of the screen, finally you will get the install screen and click install

You will get the progress like below


Once installed, you will get prompt like below, in that click finish

That’s it node is installed successfully. Now we can go and verify in the normal command prompt by entering these two commands:
- Node –v
- Npm –v
You will get a version of that, like the below screen shot,

Additional note
If nodes are not properly installed then, you will see this message in command prompt.

Step 2 Install angular cli using node
To install angular cli, here is the command
Command - npm install -g @angular/cli
We can also use alias,
Command - npm i -g @angular/cli
Note
-g refers that it will install globally
Type the above command and press enter, you will see the screen like below,

It will take time; it depends on your system configuration and internet speed.
Once installed successfully, you will see screen like below,

Note
You will get some warning, but those are safe to ignore.
To verify the version of Angular CLI installed, execute the following command
Command
Ng –v

Note
At the time of writing this article, in my system it was installed @angular/cli: 1.4.5. And it may vary in future.
Step3 Create new project using angular cli
To do that, open Command Prompt and execute the following command. This command creates all the required files and also installs all the required packages.
Command
ng new HelloworldAngularApp
- ng represents Angular CLI
- new for creating a new application
- HelloworldAngularApp is the name of your angular application, you can specify any name you want
Note
Before running this command change the directory in command prompt to where you would like to create a project. In my case I created the project in D: directory itself. So you change it accordingly
Screen shot for creation

Once it has been successfully installed in all the packages, you will see screen like below,

Step 4 develop and run the project
To develop the project that was created, just open that in visual studio code.
Here is the command to open the project in vs code,
Command -> Code .
Notice there is a single space and a DOT after the word code
Now go to the directory of the project by using the cd command like below screen shot




















Vinay VishwakarmaPosted Sep 11, 2020, 3:03 AM
Thanx bro.......................!
Sandip G PatilPosted Aug 11, 2020, 11:55 PM
Nice article............
Monisha VenkatPosted Aug 4, 2020, 8:09 AM
Very Useful bro..Thank you bro
Dharmesh SharmaPosted Nov 28, 2019, 3:10 AM
Dear Karthik, this will not work in case of add more components like /login,/register in routing. This is just basic you create app and upload which is not real time call. As you know real time projects have multiple complexity so you have to think like that.
Hala FathyPosted Sep 25, 2019, 2:25 AM
I need to deploy an angular app with ssr and couldn't find any tutorial on that. Could you please help?
Rakesh reddyPosted May 23, 2019, 8:15 AM
Thank you Karthik, it was very helpful.
Sandip G PatilPosted Dec 19, 2018, 12:53 AM
Nice article
Sachin RajakPosted Oct 16, 2018, 1:01 AM
Its not working with web api
Srashti JainPosted Jun 4, 2018, 5:55 AM
Article is really helpful. :)
Sanjeev RanjanPosted Apr 27, 2018, 12:09 PM
Don't we need to add web.config?
balwant balwantPosted Feb 15, 2018, 4:52 AM
Nice article bro, thanks a lot
Dharmraj ThakurPosted Nov 12, 2017, 11:14 PM
Well done brother.........................
Santhakumar MunuswamyPosted Nov 11, 2017, 8:58 AM
Well written Karthik. Keep it up