ANGULAR 10

Angular 10 with Getting Started

Needs:

Your computer have to nodejs. If you don’t you must download nodejs.

npm install -g @angular/cli

To create a new workspace and initial starter app

 ng new my-app
  1. Navigate to the workspace folder, such as my-app.
  2. Run the following command:
  cd my-app
  ng serve --open

cd my-app
ng serve –open

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

At this point I encountered an error.

ng : File C:\Users\…\AppData\Roaming\npm\ng.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Exec
ution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1

  • ng serve –open
  • ~~
    • CategoryInfo : SecurityError: (:) [], PSSecurityException
    • FullyQualifiedErrorId : UnauthorizedAccess

Open powershell in administrative mode and run the following command:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted