Creating and Running an Angular Application

Daniel Rogers
2 min readMay 24, 2020

--

  1. Creating your Angular Application from the terminal
Terminal command: ng new your-project-name
In your terminal go to the directory you would like to create your project and enter the command: ng new your-project-name

Remember to replace your-project-name seen in the example with your desired project name

Console output of option to add Angular routing and style sheet format.
You will then have the option to add Angular routing and your desired style sheet format.

If you are not sure what Angular routing is just choose: No

Terminal output seen when creating an Angular project
If your project was created correctly it should look somewhat like the above

Change your directory so that you’re within your newly created project folder

Terminal Command: npm install
Be sure that you are within your newly created project folder and run: npm install
Terminal output seen after running npm install
You should see something similar to the above after running the last command

2. Running your Angular Application locally

Terminal command: ng serve
Enter the command: ng serve
Console output seen after running ng serve
You will then see some console output like this
Search address bar with the URL http://localhost:4200
Try going to http://localhost:4200 — the default port for Angular

Upon navigating to http://localhost:4200/ you will see a sample page generated by Angular

Sample page generated by Angular

--

--

Daniel Rogers

I am an aspiring writer & entrepreneur. I have a background in tech, real estate, hospitality and construction. I currently reside in Western North Carolina.