Welcome to Angular..!
Angular is an application design framework and development platform for creating
efficient and sophisticated single-page apps. It helps you to build modern
applications for the Desktop, Web and Mobile.
This guide explains how to set up your environment for Angular development using
the Angular CLI tool. It includes information about prerequisites, installing
the CLI, creating an initial workspace and starter app, and running that app
locally to verify your setup.
For getting started an Angular Application you needs 2 things as Prerequisites.
To use the Angular Framework, you should be familiar with the following:
Angular requires a current, active LTS (long term support) or maintenance LTS
(long term support) version of Node.js.
Download latest version of node.js from nodejs.org.
Install Node.js using downloaded file.
To check your node version, run node -v in a terminal/console window (cmd)
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/console window (cmd)
For better understanding Angular we suggest you once go through official
documentation of Angular from Angular
Documentation
You can use 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 CLI using npm, open a terminal/console window and run the following command.
npm install –g @angular/cli
You develop apps in the context of an Angular workspace.
To create a new workspace and initial starter app:
ng new my-app
The Angular CLI installs the necessary Angular npm packages and other dependencies. This can take a few minutes. The CLI creates a new workspaces and a simple Welcome app, ready to run.
The Angular CLI includes a server, so that you can build and serve your app locally.
cd my-app
ng serve --open
The ng serve command launches the server, watches your files, and rebuilds the
app as you make changes to those files.
The --open
or -o
just Option automatically opens your
browser to http://localhost:4200/.
If you have already download and install node.js and Angular CLI then ignore prerequisites.
Download latest version of node.js from
nodejs.org.
Install Node.js using downloaded file.
To check your node version, run node -v in a terminal/console window (cmd)
To install the Angular CLI using npm, open a terminal/console window and run the following command.
npm install –g @angular/cli
Admitro/Angular-LTR/Vertical-Light>
npm install
ng serve
Once you serve your application by default it will take their default port using
http://localhost:4200/
ng build