This very simple repository will allow you to understand the basics of the Angular framework !
Follow the progress of construction step by step via the progressive commits
-
Download latest version of node js
-
Download latest version of npm :
npm install -g npm@latest
- Install the Angular CLI (“Command Line Interface”) globally :
npm install -g @angular/cli
- Create a new project :
ng new my-new-project
- start the development server :
ng serve --open
- optional install Bootstrap :
npm i bootstrap
in the angular.json file, "architect / build / options", modify "styles" : "styles": [ "./node_modules/bootstrap/dist/css/bootstrap.css", ]
- rxjs compat for compatibility of observables :
npm install rxjs-compat --save
ng generate component componentName
ou
ng g c componentName
- String interpolation || {{...}}
- Property binding || constructor() + this.
- Event binding || (click)="on...()"
- Two-way binding || FormsModule & ngModel
- Custom properties || @Input
- Structural directives || ngIf, ngFor
- Directives by attribute || ngStyle, ngClass
- Use DatePipe || {{ lastUpdate | date }}
- Chaining pipes || {{ lastUpdate | date | uppercase}}
- AsyncPipe || {{... | async | ...}}