Table of Contents
1. Download and install Node.js.
Windows
Test the installations.
On console, type:
node -v
2. CLI INSTALL
CLI stands for Common Line Interface and brings important commands to be used on console.
Global Installation
– Install CLI globally, but if already installed just use “npm install”:
npm install -g @angular/cli
The last one:
npm install -g @angular/cli@latest
To install a specific version:
npm install -g @angular/cli@10.0.8
Local Intallation
Install angular locally if it is desired a different version of the global one.
In this case, a local node_modules folder is created at current dir.
This folder shall not be used for the project. Let it under the root directory.
When creating a new project, a new node_modules is created inside the project’s dir, usually a subdirectory of the local CLI installation.
npm install @angular/cli
If @angular/cli already installed globally, then go straight to the next cmd.
@DEPRECATED: npm install -g angular-cli
(cause “fallbackLoader option has been deprecated” message).
@Check angularx***faq
@For internal site control.:
y;project setup<memo<angularx;.
n;install<memo<revision05a10;.
3. Creating The Project
– generate a new project and skeleton application:
ng new MY_PROJECT
– project using SASS, you need to run the following command:
ng new MY_PROJECT –style=scss
– then launch the server:
cd MY_PROJECT
ng serve
– starts serve and opens on browser:
ng serve -o
– or to start specific port (not default = 4200):
ng serve –port 9001
– or to start with host and port definition:
ng serve –host 0.0.0.0 –port 4205
– point to:
http://localhost:4200/
– returns:
Our app works!
Brazilian system analyst graduated by UNESA (University Estácio de Sá – Rio de Janeiro). Geek by heart.