How to Install and Set up Angular 8 on macOS X

angular-mac
Angular macOSLeave a Comment on How to Install and Set up Angular 8 on macOS X

How to Install and Set up Angular 8 on macOS X

Angular is a JavaScript open-source framework which helps in developing single-page web applications suitable for web/mobile/desktop. Angular supports the use of TypeScript instead of JavaScript in our project if we are familiar with it.

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 the desktop.

The current stable version of Angular is 8.2.0 and we are going to explain the steps of installation of it on macOS X operating system.



1. Install and Update Homebrew

Homebrew is a popular package manager for macOS. We can install all the packages and dependencies required to install Angular using Homebrew. So at first, we need to install it on our system.

To install Homebrew, open the Terminal and run the command below.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

So we have installed Homebrew on our system successfully and now we need to update it so that we can get the latest version of packages available on HomeBrew.

brew update

2. Install Nodejs

In this tutorial, we are going to install Angular 8 using the Node Package Manager(NPM). So first, we need to install Nodejs on our system. NPM will be installed with Nodejs itself.

Nodejs can be installed on our system using the below brew command.

brew install node

Alternative method

Alternatively, we can download and install Nodejs from the official website. If so, it does not need Homebrew to be installed on our system.

Currently, 12.7.0 is the latest version of Nodejs and it can be downloaded and installed on our system using the URL below.

 https://nodejs.org/en/download/current/ 

Select the macOS installer option and download the node-v12.7.0.pkg file. Then install it on our system.

3. Install Angular CLI

Angular CLI helps us to create projects, generate application and library code, and perform a variety of ongoing development tasks such as testing, bundling, and deployment.

It can simply be installed using NPM. So first, open Terminal and install the Angular CLI with the below command.

npm install -g @angular/cli

4. 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

5. 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.

http://localhost:4200

Have a nice code !

Hi, I'm Syamlal, the co-founder of Redmonark. I'm a developer, writer and also have a little bit of experience in graphic designing.
Website https://syam.me

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back To Top
%d bloggers like this: