Sitemap
YavarTechWorks

Today a Reader, Tomorrow a Leader

Angular project setup

3 min readJul 16, 2022

--

Basic instructions to implement an angular project…

Hi unique individual who reading this ! I wish everyone’s eyes and lips could be filled with happiness as mine . Let’s spend some time in this blog with that happiness.

Press enter or click to view image in full size

In this blog , i am going to share how to setup a new angular project with angular/cli.

Pre-Requests:

Before going to install angular project , we should have several things. They are NodeJS and npm .

  • NodeJS — -> It is used to bundle and optimize(Rearrange) the project.
  • npm — -> It is used to manage different dependencies(particular order that must be followed to a process).

Comments to verify the versions of npm and node in your machine:

  • To check npm version:
npm -v
  • To check node version:
node -v

It may look like below :

comments to check node and npm versions

NOTE : Kindly install npm and node before try to install angular project.

Step by Step procedures to start an Angular project:

Step 1 : Install angular/cli by the following command:

npm install -g @angular/cli

OR ( For latest version of angular )

npm install -g @angular/cli@latest

Step 2 : Check installed angular version:

ng version

Sample Screen:

Press enter or click to view image in full size
Sample screen of ng serve command

Step 3 : Go to the directory where you need to create your project.

Get vijay s’s stories in your inbox

Join Medium for free to get updates from this writer.

Step 4 : Generate your new angular project :

Use the following command to get your project

ng new project-name

Once you type this command , the system will ask for strictness and routing.

As i am trying to convey only to download the initial angular-project , i am not focusing on routing and strictness . So , i responded NO and had chosen CSS . Those things will be understandable while we go-ahed in further angular concepts.

After these permissions , several files will be downloaded to our project directory as below :

Press enter or click to view image in full size
Angular-project installation

Step 5: Verify whether it is successfully installed or not .

Step 6 : Go to the project directory by below command:

cd project-name

According to your OS , you go inside the project file with your respective command.

Step 7 : Serve your application in localhost:

We can run our project in the localhost by following commands:

  • To produce link for localhost:
ng s OR ng serve
  • To open directly in browser (localhost) :
ng serve -o OR ng s -o
Press enter or click to view image in full size
ng serve command output
ng serve command

That’s it i have successfully created an angular-application and further we must update it according to our need with angular features.

Press enter or click to view image in full size
Angular-project output

Hey world’s happiest one , here you finished reading thing blog . Thanks to give your valuable time ! Let us have more and more time together to share our knowledge for benefit of both of us through medium .

Thanks!

******************* Express your reviews by a smile ******************

--

--