If you have never worked with Angular.
To use the Angular framework, you should be familiar with the following:
You will also need a code editor installed on your computer such as:
As of writing this blog, VS Code is the popular choice and my current favorite. Feel free to use the code editor of your choice.
How to setup an Angular local environment
If Node.js isn’t on your system, it must first be installed. Please visit the Node.js website to download and install it onto your system. You should stick with the LTS Long Term Support version.
Install the Angular CLI
After Node.js is installed, run the following command in a terminal.
npm install -g @angular/cli
The -g flag is for Global install. If your user account doesn’t have administrative privileges such as a standard user on a Mac, you will need to add “sudo” at the beginning of the command.
sudo npm install -g @angular/cli
Create a new Angular application
ng new my-app
ng new command tells the angular cli to create a new application.
my-app is the name of our new application.
Once the new application is created, navigate to the newly created directory and open it in your code editor.
cd my-app code .
cd command changes the directory.
code . command starts VS Code in the current project directory.
Run the Application
ng serve --open
ng serve command launches the server, watches your files, and rebuilds the app as you make changes to those files.
--open option automatically opens your browser to
Your installation and setup was successful if you should see a page similar to the following.
To continue on your journey visit the Angular website and start their Tour of Heroes Tutorial. It’s quite in depth and will give you a better grasp of what Angular is capable of.