To start a new Angular project, you first need to install the Angular Command Line Interface (CLI) by running the following command:
npm install -g @angular/cli
Angular/cli comes from the npm registry, which is a large online repository of open-source Node.js packages. The Registery url is:
https://www.npmjs.com/package/@angular/cli
So, First inorder to install angular/cli, we need to have the node.js as a requirement to be installed in our system.
Prerequisites:
- Node.js
- Text Editor to Write the code
- Terminal to Run the Angular code
Node.js:
To Install Node.js, Navigate to the Node.js Website and download and install Node Js on your system. After Installation, Check for the version you have installed:
node --version
Text Editor:
To Install Visual studio code, Navigate to the VS Code Website and download and install Editor on your system.
Terminal:
Use Command prompt, or Active Terminal that comes from visual studio code or Powershell to run all the angular specific commands.
Verify the version of angular/cli that is installed in your system:
'ng' is a angular/cli tooling used to create angular project, start a local development server,create angular components and services, Build application for deployment, run unit tests and many more. To check the version of 'ng' Run the following command:
ng --version
Create an Angular project by running the following command in the Terminal:
ng new Your-Project-Name
Running our Development Server Locally:
After Everything is set, We need to run the development server to Run our angular application locally on the port: 4200, Using the command
npm start (or) ng serve
Click the link To Know About Angular Project Structure : Angular Project Structure
0 Comments