Angular installation guide:  How to setup Angular local environment

Prerequisites for angular installation

– JavaScript – HTML – CSS Knowledge of TypeScript is helpful, but not required.

To install Angular on your local system, you need the following:

–  Node.js –  npm package manager

 Node.js 

Angular requires an active LTS or maintenance LTS version of Node.js.  run node -v in a terminal window to check version of Node.js runs on your system

 npm package manager

The Angular CLI, and Angular applications depend on  npm packages for many features and functions. To download and install npm packages, you need an npm package manager.

The npm client command line interface, which is installed with Node.js by default.

Angular Installation Using CLI

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

To install the Angular CLI, open a terminal window and run the following command:

npm install -g @angular/cli

Create a workspace and initial application

To create a new workspace and initial starter app:

Run the CLI command ng new and provide the name my-app, as shown here:

The ng new command prompts you for information about features to include in the initial app. Accept the defaults by pressing the Enter or Return key.

ng new my-app

Run the application

– Navigate to the workspace folder, such as my-app.

cd my-app

–  Run the following command to. start app:

ng serve --open

If your installation and setup was successful, you should see a page similar to the following.