Setup

Setting up Angular

This tutorial was written in Angular v10. To setup an Agular v10 environment, you need to install Node.js v12 or v14.

If you need other nodejs versions, you can use nvm to install node 14 and switch to node 14 only for this’s environment shell.

nvm install 14
nvm use 14

Install the Angular CLI

npm install -g @angular/cli@10

-g will install the CLI globally (but if you are using nvm, this will only affect your current node version).

Create a workspace

1mkdir workspace
2cd workspace

Create the initial application

Inside the previous directory execute:

1ng new tutorial-I-login-bexstream
2cd tutorial-I-login-bexstream

Answer the following questions:

? Would you like to add Angular routing? (y/N)

y

Which stylesheet format would you like to use?

(Choose whichever you like, we will not delve into style.)

Enter the previously created project and install the following dependency:

npm i @angular/material@10

Run the application:

ng serve