- Download Node.js and install it in your machine
- When installing on Windows machines, check the box related with Chocolatey
- After installation, verify that Node.js is working on your machine by running:
node -v
npm -v
-
Install Angular CLI (this module contains the necessary code for running the
ng
commands, building your application, etc.)npm install -g @angular/cli
-
On Windows machines, if you're using Powershell as your terminal, run the following command (it is recommended to not use Powershell since it may be problematic)
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
-
Go to a folder of your choice and run in your terminal the following command to generate the Angular project files:
ng new your-app-name-here
- Select SCSS in the prompt for stylesheet format
- Select NO in the prompt for Server-Side Rendering (SSR)
- Wait while Angular CLI creates the project's files and installs the required node modules
-
You are ready to run the project with the command:
ng serve
By default, the app will be accessible with your browser in address http://localhost:4200
Generate components: ng generate component YourComponentNameHere
Build (compile) the project: ng build -c production