Setting up your new angular project

Madhavi Kulkarni
3 min readFeb 13, 2020

I am new to angular and took up task to setup angular and learn by making my hands dirty. So started experimenting the setup.

Initially I downloaded the Visual studio code.

Created a new folder on my desktop with a name called practice ui. Then I opened the VS Code and opened the folder in it.

Then the first step is to install the angular so ran the below command:

> npm install -g @angular/cli

Now angular cli is installed.

But if Node is not installed, you may get error. If so, quickly download the node v 8.x above. The latest version is better to download. And install the node and run the command.

Version of node

To download node, you can use below URL:

Now create your new project with command:

> ng new <Project_name>

This may take some time….

Once project is created, the name of the project reflects in the directory.

then change the path to that directory :

>cd <project_name>

Now run the project by running below command:

> ng serve

Project compiled successfully.

You can see the webpage by running the URL on web browser. :

http://localhost:4200/

You will see the below page.

Web page of the project running in localhost.

Now you can develop your own page and run the project using ng serve command all the times.

Most common error:

You may face below issue sometimes:

To solve the above error, open Powershell and run it as Administrator.

Type the below command:

Set-ExecutionPolicy RemoteSigned

Now again run the ng command. It works.

Thank you so much for reading the post. Hope it helped you. Keep practicing.

Happy Learning :)

--

--