Angular js : setup local environment and workspace for angular js
This question is to describe and teach to beginner to start an angular js app and project.
Before you start with this tutorial please check dependencies for an angular js project. This guide explains how to set up your environment for Angular development using the Angular CLI tool
Learn Angular JS
Before you begin, make sure your development environment includes Node.js and an npm package manager.
Angular requires Node.js version 10.9.0 or later.
To check your version, run node -v in a terminal/console window.
To get Node.js, go to nodejs.org.
STEP 1: Install the Angular CLI
You use the Angular CLI to create projects, generate application and library code, and perform a variety of ongoing development tasks such as testing, bundling, and deployment.
Install the Angular CLI globally.
To install the CLI using npm, open a terminal/console window and enter the following command:
npm install -g @angular/cli
Step 2: Create a workspace and initial application
To create a new workspace and initial starter app:
1. Run the CLI command ng new and provide the name my-app, as shown here:
ng new my-app
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.
Step 3: Run the application
Go to the workspace folder (my-app) via command line and run.
ng serve –open
Your app looks like this:
for more reference See More