programowanie:angular:start

To jest stara wersja strony!


Angular


Angular wymaga Node.js: https://nodejs.org/en/download/prebuilt-installer/current
Uruchamiając npm na Windows otrzymamy błąd: npm : File C:\Program Files\nodejs\npm.ps1 cannot be loaded because running scripts is disabled on this system.
Uruchomienie polecenia

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

w konsoli powinno wyeliminować problem.

Angular instalujemy następującym poleceniem w konsoli:

npm install -g @angular/cli



  • Utworzenie projektu
ng new project_name


  • Uruchomienie serwera deweloperskiego

W folderze głównym projektu:

npm start



ng generate component my_component

lub wersja skrócona:

ng g c my_component
  • programowanie/angular/start.1728308445.txt.gz
  • ostatnio zmienione: 2024/10/07 15:40
  • przez sases