Angular combines declarative templates, dependency injection, end-to-end tooling, and integrated best practices to solve development challenges. Angular empowers developers to build applications that live on the web, mobile, or desktop.
Let us quickly jump into the installation steps.
To continue with this article, the reader must know the basics of working with the Terminal in a macOS system.
What we will learn?
After completing this article, we will learn:-
- Install Node.js on a macOS system
- Installing the Angular CLI.
- Creating a new Angular application
- Running the Angular app we created
In this tutorial, we are going to install Angular 11 using the Node Package Manager(NPM). First, install Nodejs on our system. NPM will be installed with Nodejs itself.
We can download and install Nodejs from the official website. Currently, 16.13.0 is the stable version of Nodejs and it can download and install on our system using the URL below.
From the page, select the macOS installer option and download the pkg file. Now install it on our system.
Install Angular CLI
Angular CLI helps us to create projects, generate application and library code.
It can simply be installed using NPM. Open Terminal and install the Angular CLI with the below command.
npm install -g @angular/cli
Creating a New Angular Application
We successfully installed Angular CLI on our system and now we can set up a workspace for Angular projects in our system and create a new app. This can be done with the below command.
ng new awesome-project
Running Our App
Now, the app we created can be run using ng serve command.
cd awesome-project ng serve --open
This launches the server, watches our files, and rebuilds the app as we make changes to those files.
The –open (or just -o) option automatically opens our browser to the below address.
Here in this article, we discussed the steps to install Angular 11 on a macOS system. Angular CLI made it easier to create new Angular projects.