How To Install Angular on Windows, macOS, and Linux (2024)

Angular has quickly become one of the most popular frameworks for building web applications, thanks to its robust set of features and ease of use. But how do you use it?

Today, we’ll cover everything you need to know about Angular, from its background and importance in web development to a step-by-step guide on how to install it on various operating systems. There’s no time to waste, so let’s get started.

What Is Angular?

How To Install Angular on Windows, macOS, and Linux (1)

Angular is an open-source web application framework developed by Google in 2010. It is based on TypeScript, a statically-typed superset of JavaScript that adds optional types and other features for more robust and maintainable code.

Angular has a component-based architecture, which means that applications are built using reusable components that can be easily integrated into the larger application. This approach allows for better organization, maintainability, and scalability of your projects.

Some of the key features of Angular include:

  • It’s component-based
  • Focus on scalability and maintainability
  • Strong support for two-way data binding and dependency injection
  • A comprehensive set of built-in directives and services

Who Uses Angular?

Angular is a popular choice among various types of developers, including:

  • Web developers
  • Front-end developers
  • Full-stack developers

Many major companies use Angular in their projects as well due to its power and flexibility.

Some of these companies include:

  • Google: It’s no surprise that Google, the creator of Angular, is also one of its biggest users. Google has used Angular in various products, such as Google AdWords, Google Cloud Platform, and the Google Analytics suite.
  • Microsoft: Microsoft has adopted Angular for several of its products, including the popular code editor Visual Studio Code, which is built using Angular and other web technologies. Additionally, Microsoft has integrated Angular into its Azure platform for building and deploying cloud applications.
  • IBM: Another major tech company that has embraced Angular for its projects is IBM, which has used Angular in its customer support platform.
  • PayPal: The leading global online payment platform, has chosen Angular for its web development projects. The company’s PayPal Checkout product, which allows businesses to securely accept payments online, is built using Angular, demonstrating the framework’s ability to handle secure, large-scale applications.
  • Upwork: The popular freelancing platform that connects businesses with professionals also leverages Angular for its web development needs. The company’s Upwork Talent Platform is built using Angular, showcasing the framework’s capabilities in creating a responsive and user-friendly interface for managing projects and hiring freelancers.
  • Lyft: The ride-sharing platform uses Angular for its web application development. The company’s Lyft Business platform, which provides transportation solutions for businesses and organizations, is built using Angular, showcasing the framework’s ability to create scalable and robust applications for diverse industries.

With such a wide variety of companies embracing Angular, it’s clear that this powerful framework is an excellent choice for web development projects of all sizes and complexities.

Advantages of Using Angular

Before we dive into the installation process, let’s briefly discuss some of the key advantages of using Angular for your web development projects:

Component-Based Design Promotes Reusability

Angular’s component-based architecture encourages developers to create modular, reusable components that can be easily integrated into larger applications. This approach not only makes your code more organized but also promotes reusability, which can save time and effort in the long run.

Strong Support for TypeScript

TypeScript, the statically-typed superset of JavaScript, is a core part of Angular. TypeScript’s optional types and other features make it easier to write robust and maintainable code, which is especially important for large-scale projects.

Emphasis on Modular Architecture

Angular’s focus on modularity means your applications can be easily organized into smaller, more manageable pieces. This makes it simpler to scale your projects, as well as maintain and update them over time.

Built-In Support for Reactive Programming

How To Install Angular on Windows, macOS, and Linux (2)

Angular has built-in support for reactive programming through the RxJS library. Reactive programming is a powerful paradigm that allows you to work with asynchronous data streams, making it easier to handle complex data flows and user interactions in your applications.

Robust Ecosystem and Tools

Angular boasts a rich ecosystem of tools, libraries, and resources to help you get the most out of the framework. From the Angular CLI (Command Line Interface) to the extensive collection of third-party libraries, you’ll have everything you need to build, test, and deploy your applications with ease.

Angular Prerequisites

Before you start installing Angular, it’s essential to have some basic knowledge and tools in place. Here’s a list of prerequisites you should be familiar with:

  • Basic knowledge of JavaScript: Angular is built on JavaScript, so having a solid understanding of the language is crucial. If you’re new to JavaScript, you may want to brush up on your skills first.
  • Familiarity with command line/terminal: Throughout the installation process and when using Angular, you’ll need to work with the command line (on Windows) or the terminal (on macOS and Linux). Familiarity with basic commands and navigation is essential to getting started with Angular.
  • Familiarity with TypeScript (optional): While not strictly necessary, having a basic understanding of TypeScript can be helpful when working with Angular, as the framework is built on TypeScript. You can learn more about TypeScript through the official documentation.
  • Node.js and npm installed: Angular requires both Node.js and the Node Package Manager (npm) to be installed on your system. If you don’t already have them installed, you can follow the instructions in our guide on how to install Node.js.

System Requirements

Before installing Angular on your machine, it’s essential to ensure your system meets the following requirements:

  • Operating System: Windows 10, macOS 10.10 (Yosemite) or later, or a recent distribution of Linux (such as Ubuntu 18.04 or later)
  • Memory: At least 4 GB RAM
  • Storage Space: At least 10 GB of free disk space

These requirements ensure that Angular runs smoothly on your system and that you can effectively develop and test your applications.

How To Install Angular

The process for installing Angular is very similar across Windows, macOS, and Linux operating systems. However, it’s still a good idea to follow the specific instructions for your system for the best results.

How To Install Angular on Windows

In this section, we’ll guide you through the process of installing Angular on a Windows machine. Follow the steps below to get Angular up and running on your system:

  1. Install Node.js and npm
  2. Install Angular CLI
  3. Run Angular CLI commands
  4. Create a workspace for the application
  5. Run Angular in your browser

Step 1: Install Node.js and npm

Before you can install Angular, you’ll need to have Node.js and npm (Node Package Manager) installed on your machine. Again, if you haven’t already installed them, follow the instructions in our guide on how to install Node.js.

Step 2: Install Angular CLI Globally

Next, you’ll need to install the Angular CLI tool. To install the Angular CLI globally on your system, open the Command Prompt and run the following command:

npm install -g @angular/cli

This command installs the latest stable version of the Angular CLI tool and makes it available for use throughout your system.

Step 3: Run Angular CLI Commands

Once you have the Angular CLI installed, you can use its commands to manage your Angular projects. To verify that the installation was successful, run the following command in the Command Prompt:

ng --version

This command displays the installed version of the Angular CLI, along with other relevant information about your environment.

Step 4: Create an Initial Workspace for the Application

To create a new Angular application, you’ll need to create a workspace. A workspace is a directory that contains the configuration files and source code for your Angular projects. To create a new workspace, run the following command in the Command Prompt, replacing my-app with the desired name for your application:

ng new my-app

This command creates a new directory with the specified name, sets up the necessary configuration files, and generates an initial Angular application within the workspace.

Step 5: Run the Angular Application in Your Browser

To test your new Angular application, navigate to the newly created directory using the cd command:

cd my-app

Then, start the development server by running the following command:

ng serve

This command compiles your Angular application and starts a development server. By default, the server runs on port 4200.

Open your preferred web browser and navigate to http://localhost:4200/. You should see your new Angular application running in the browser.

How To Install Angular on Windows, macOS, and Linux (3)

Congratulations! You’ve successfully installed Angular on your Windows computer and created your first Angular application. You can now start building your projects.

How To Install Angular on macOS

In this section, we’ll guide you through the process of installing Angular on a macOS machine. Follow these steps to get Angular up and running on your system:

  1. Install Node.js and npm
  2. Install Angular CLI globally
  3. Test that Angular was installed correctly
  4. Create an Angular application
  5. Run the application

Step 1: Install Node.js and npm (If Not Already Installed)

As mentioned previously, you need to have Node.js and npm installed on your computer before you can install Angular. If you have it already proceed to step 2. If not, follow along with our how-to guide first, then continue with this tutorial.

Step 2: Install Angular CLI Globally

Just as with the Windows instructions, you need to next install Angular CLI, which is what you need to create (and manage) Angular applications. To do this, open the Terminal and run the following command:

npm install -g @angular/cli

By running this command, you can install the most recent stable release of the Angular CLI tool and access it across your system.

Step 3: Test Angular Installed Correctly

After installing the Angular CLI, you can utilize its commands for managing Angular projects. To confirm a successful installation, run the subsequent command in the Terminal:

ng --version

You should see the version of Angular CLI displayed.

Step 4: Create an Angular Application

To begin a new Angular application, you need to first create a workspace. This involves making a folder that will store the configuration files and source code for your Angular projects. To create the workspace, open the Terminal and enter the code below. But just like the instructions for Windows and macOS, remember to substitute “my-app” with the name you prefer for your application.

ng new my-app

This command performs three tasks: it creates a new directory with a specified name, sets up the configuration files required, and generates an initial Angular application within the workspace.

Step 5: Run the Application

To check your new Angular application, use the cd command to go to the directory where it was created.

cd my-app

Then, start the development server by running the following command:

ng serve

To compile your Angular application and launch a development server, use this command. The server will run on port 4200 by default.

Please open your favorite web browser and go to http://localhost:4200/ to see your new Angular application.

And that’s all there is to it. You now have Angular installed on macOS and have created an Angular application successfully.

How To Install Angular on Linux

Lastly, we’ll guide you through the process of installing Angular on a computer running Linux.

Follow these steps to get Angular up and running quickly:

  1. Install Node.js and npm
  2. Install Angular CLI
  3. Create a new Angular application
  4. Test the app in your browser

Step 1: Install Node.js and npm (If Not Already Installed)

Just like the Windows and Mac instructions, you need to have Node.js and npm installed prior to getting Angular on your Linux machine. Take a look at our detailed installation guide to learn how to do this or proceed to the next step if you’ve done it already.

Step 2: Install Angular CLI With npm Package Manager

Your next order of business is to install Angular CLI on your system. To do this, open a Terminal window and enter the command below:

npm install -g @angular/cli

Or, you can use the following instead:

$ sudo npm install -g @angular/cli

This command installs the latest stable version of the Angular CLI tool and makes it available for use throughout your system.

Step 3: Create a New Angular Project

To create a new Angular application, you’ll need to create a workspace. A workspace is a directory that contains the configuration files and source code for your Angular projects. To create a new workspace, run the following command in the Terminal, replacing my-app with the desired name for your application:

ng new my-app

This command creates a new directory with the specified name and sets up the necessary configuration files for it. It also generates an initial Angular application.

Step 4: Test the New Application in a Web Browser

To test your new Angular application, navigate to the newly created directory using the cd command:

cd my-app

Then input the following:

ng serve

The server runs on port 4200, so to access it, you’ll need to open a web browser and go to http://localhost:4200/.

If all went correctly, you should see your new Angular application in the browser.

And with that, you now have Angular installed on Linux. There’s no telling what you might do next!

Summary

If you’ve followed along, today we’ve guided you through the process of installing Angular on Windows, macOS, and Linux. And by following the steps outlined for each platform, you should now have a working Angular development environment and be ready to start building web applications using this powerful framework.

As you begin learning and using Angular, don’t forget to explore the extensive resources available to help you master the framework. From official Angular documentation to community-driven resources like Angular University, you’ll find plenty of material to support your learning journey.

You may also wish to consider joining Angular-focused communities, such as the r/Angular subreddit, where you can ask questions, share your experiences, and learn from fellow developers.

Once you’re ready to deploy your Angular applications, consider using Kinsta Application Hosting. Kinsta offers high-performance hosting solutions designed for applications built with frameworks like Angular, ensuring a fast, secure, and reliable experience for your users.

With Angular installed and a wealth of resources at your fingertips, you’re well on your way to becoming a proficient Angular developer. Best of luck!

How To Install Angular on Windows, macOS, and Linux (2024)

FAQs

How To Install Angular on Windows, macOS, and Linux? ›

The Npm stands for Node Package Manager. Npm is a package installation tool. Npx is a tool for executing packages. NPX is a npm package runner whose job it is to execute a package from the registry without ever installing it.

How to install Angular in Mac OS? ›

We will be covering the following contents:
  1. Pre-requisites. The Pre-requisites for installation.
  2. Download and Install Node.js. The Download Site Address. ...
  3. Test Installation of Node.js.
  4. Install Angular CLI. ...
  5. Testing the installation of Angular CLI.
  6. Create New Angular Application. ...
  7. Serve Angular Application. ...
  8. Check the Output.
Aug 9, 2023

How to install Angular CLI globally? ›

To install angular CLI globally Run the following command on your VSCode Terminal or Command Prompt.
  1. npm install -g @angular/cli.
  2. Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned.
  3. ng new appName.
  4. npm install @angular/cli@V13.3. ...
  5. ng new appName.
Sep 15, 2022

How to install Angular in Windows system? ›

Introduction — What you will learn
  1. Install Node/npm on your machine.
  2. Use and install Angular CLI globally.
  3. Run Angular CLI commands.
  4. Create an initial workspace for the application.
  5. Run the Angular application in Browser.
Jul 20, 2023

How to run Angular build on Linux? ›

Create an Angular app
  1. Setup a local environment starting with Angular CLI: npm i @angular/cli -g.
  2. Create a workspace and initial application with: ng new projectname. It will prompt for selecting Angular Routing and stylesheet format.
  3. To create a production build you can run: ng build.
Jan 29, 2022

How to install Angular CLI in VS Code on Mac? ›

Configuring Angular In VS Code
  1. Goto - https://nodejs.org/ ...
  2. Step 2 - Installation - use the default settings. ...
  3. Step 3 - Search for Windows PowerShell. ...
  4. Step 4 - Close the PowerShell and open new PowerShell to install Angular CLI. ...
  5. Step 5 - Installing Visual Studio Code. ...
  6. Step 6 - Open VS Code. ...
  7. Step 7 - Create new project.
Feb 24, 2021

What is the difference between NPX and npm? ›

The Npm stands for Node Package Manager. Npm is a package installation tool. Npx is a tool for executing packages. NPX is a npm package runner whose job it is to execute a package from the registry without ever installing it.

How to install Angular with npm command? ›

Type the command “npm install -g @angular/cli” on the command prompt and press enter to install Angular cli. Type “ng new hello-world” and hit enter to create the Hello World app. Once you see the message “Project 'hello-world'” it means the app is created on the disk.

How to install Angular CLI globally in cmd? ›

  1. Install Angular CLI globally using npm. npm install -g @angular/cli. Explanation: This command will install the angular cli package globally. ...
  2. Test if ng cli is installed: ng help. It is fairly straight forward on Mac. ...
  3. Create new project: ng new ang-cli-proj. ...
  4. Serving the new project: Navigate to the new project folder:

How to locally install Angular? ›

Install Angular on Windows
  1. Step 1: Install Node. js. ...
  2. Step 2: Install TypeScript (Optional) The next step is to install Typescript on your local machine. ...
  3. Step 3: Install Angular CLI (Angular command line interface) ...
  4. Step 4: Create Angular Project. ...
  5. Step 5: Run the Angular Application in Browser.

How to install npm in windows? ›

How to Install Node.js and NPM on Windows?
  1. Step 1: Download the Installer. Download the Windows Installer from NodeJs official website. ...
  2. Step 2: Install Node.js and NPM. After choosing the path, double-click to install .msi binary files to initiate the installation process. ...
  3. Step 3: Check Node.js and NPM Version.
Jul 2, 2023

How to install Angular in Linux Ubuntu? ›

Installation steps
  1. Install Node. js. Node. ...
  2. Update NPM. Normally, NPM will be installed with the Node. js itself. ...
  3. Install the Angular CLI. sudo npm install -g @angular/cli. ...
  4. Create a workspace and initial Angular application. ng new my-app.
  5. Run the application. cd my-app.

How to run Angular from cmd? ›

Steps to Create your first application using angular CLI:
  1. Step-1: Install angular cli npm install - g @angular/cli.
  2. Step-2: Create new project by this command. ...
  3. Step-3: Go to your project directory cd myNewApp.
  4. Step-4: Run server and see your application in action ng serve -o --poll=2000.
Jan 3, 2022

How to install Angular in redhat Linux? ›

How to Install Angular CLI
  1. Step 1: Prerequisites. ...
  2. Step 2: Update Your System. ...
  3. Step 3: Check Node Version. ...
  4. Step 4: Check NPM Version. ...
  5. Step 5: Install Angular CLI. ...
  6. Step 6: Check Angular CLI Version. ...
  7. Step 7: Create First Test Application. ...
  8. Step 8: Compile and Deploy Your Application.
Apr 3, 2020

Can we host Angular app on Linux server? ›

We need below software to deploy an Angular app in a Linux server. 1. Any Linux server. Here I am going to use the ubuntu server(Disk : ~25GB,Memory : 2GB,CPU: 1 core).

How to install Angular via terminal? ›

Type the command “npm install -g @angular/cli” on the command prompt and press enter to install Angular cli. Type “ng new hello-world” and hit enter to create the Hello World app. Once you see the message “Project 'hello-world'” it means the app is created on the disk.

How to install Angular in Mac using brew? ›

You must need to install Homebrew package manager on your macOS.
  1. Step 1 – Prerequsities. Let's start the installation of Node.js on your macOS system using Homebrew. ...
  2. Step 2 – Install Angular/CLI on macOS. After installing the Node. ...
  3. Step 3 – Create New Angular Application. ...
  4. Step 4 – Serve Angular Application.
Mar 6, 2020

How to install npm in mac? ›

How to Install Node.js and NPM on Mac?
  1. Step 1: Download the .pkg Installer. Click on the “ macOS Installer ” option to download the .pkg installer. ...
  2. Step 2: Run Node.js Installer. Now, your installer is ready to run. ...
  3. Step 3: Verify Node.js Installation. ...
  4. Step 4: Update Your NPM Version.
Jul 2, 2023

How do I know if angular is installed on my Mac? ›

Checking the Angular Version

Open the Terminal + view in your project and type ng version . For recent versions of Angular, this will list the versions of several Angular packages that you have installed in your project.

Top Articles
Latest Posts
Article information

Author: Msgr. Benton Quitzon

Last Updated:

Views: 5736

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Msgr. Benton Quitzon

Birthday: 2001-08-13

Address: 96487 Kris Cliff, Teresiafurt, WI 95201

Phone: +9418513585781

Job: Senior Designer

Hobby: Calligraphy, Rowing, Vacation, Geocaching, Web surfing, Electronics, Electronics

Introduction: My name is Msgr. Benton Quitzon, I am a comfortable, charming, thankful, happy, adventurous, handsome, precious person who loves writing and wants to share my knowledge and understanding with you.