All the courses
Course information
// install nodejs
// install angular CLI
sudo npm install -g @angular/cli@latest
// npm version 7.5.4 detected.
// The Angular CLI currently requires npm version 6.
// SOLUTION
// using nvm
<https://github.com/nvm-sh/nvm>
// Check the corresponding versions between nodejs - npm
<https://nodejs.org/en/download/releases/>
// install a specific version
nvm install 14
// check installed versions
nvm ls
// use
nvm use 14 // node version
// check version
npm -v
// if npm version is greater than usual? -> downgrade it
npm install -g npm@6 // eg. for node 14
// check where npm installed
which npm // should return /Users/thi/.nvm/versions/node/v14.15.5/bin/npm
// new app
ng new my-new-app
// serve
ng serve
ng serve --port 4300
// create component
ng generate component <name>
ng g c <name> # shorthand
ng g c <name> --skipTests true # without test files
ng g c <name> --selector <app-name> # with selector
// create directive
ng generate directive <name>
ng g d <name>
// crate an app / project
// for a moment, choose "No" for first 2 options + CSS
ng new my-first-app
cd my-first-app
ng serve // port 4200
ng serve --port 4300 // custom
Input changes → name changes ⇒ check commit → need [(ngModule)]
← from FormsModule
⇒ two-way binding!
Getting started → The basics → Components & Databinding → Directives → Services & Dependency Injection → Routing → Observables → Forms → Pipes → Http → Authentication → Optimizations & NgModules → Deployment → Animations & Testing