Setup
Setup
Installing Visual Studio Code
To install Visual Studio Code, go to
Then select the download option for the operating system you are using.
You will be directed to another page and your download should start shortly. Wait for the download to finish and start the installer.
Installing NodeJS
To install NodeJS, go to
Select the download option for the operating system you are using and wait for the download process to finish and then run the installer.
You will be prompted with a series of instructions. Begin the process by clicking next and accepting the agreement. Then select the location you want to install NodeJS, leave it at the default location and click next until you reach the install page. Then click install and wait for the process to finish.
And that’s it, NodeJS is installed.
Installing the Angular Command Line Interface Tool
To install the Angular CLI, run the command
npm install -g @angular/cli
and wait for the process to finish.
With that, we are all set. We have VS code, Node JS, and the Angular CLI installed. Next I will show you how we can start our first project.
Starting your first project
Next run the Angular CLI command ng new follow by the project name. This will generate our project files.
ng new MyFirstAngularProject
You will then be asked questions on preferences for your project. Enter yes for the Angular Routing question. This will give us the ability to navigate between our web pages.
Would you like to add Angular routing? (y/N)
Then select the type of stylesheet you want to use. I will be using CSS.
Which stylesheet format would you like to use? (Use arrow keys)
Once the process finish, close the command prompt and you will see a folder in the folder you have just created.
Starting the project
Open the terminal or command prompt in the project folder. Then run the Angular CLI command
ng serve
When the process finishes, go to the browser and type
localhost:4200
in the address bar and press enter. You should see what I have on the screen or something similar. It depends on the Angular CLI version you have.
Lastly, I will show you how you can open your project on VS code.
Opening your project on VS Code
To open your project on VS code. Open the command prompt for your project and then run the command
code .
this will automatically open your project on VS code.
Recap