Prerequisites
To use the Angular framework, you should have basic knowledge on below list. Getting Started With Angular
- HTML
- CSS
- JavaScript
- TypeScript
Environment Setup:
To install Angular on your local system, you need the following:
You should install node.js to run your Angular 7 app. It manages npm dependencies support some browsers when loading particular pages. It provides required libraries to run Angular project. Node.js serves your run-time environment as your localhost.
2.npm package manager:
Angular, 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. This guide uses the npm client command line interface, which is installed with Node.js
by default. To check that you have the npm client installed, run npm -v
in a terminal window.
After the successful installation
Install the Angular CLI
Angular CLI 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 workspace Open Command Prompt Run these Commands
ng new demo cd demo ng serve --open
Run the CLI command ng new
and provide the name demo , 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.
The ng serve
command launches the server, watches your files, and rebuilds the app as you make changes to those files.
The --open
(or just -o
) option automatically opens your browser to http://localhost:4200/
.
Getting Started With Angular Getting Started With Angular