This project was generated with Angular CLI version 13.2.0.
- To install Angular globally
npm install -g @angular/cli
- to start project from the template
ng new <app name>
ng serve
ORng serve --port <PORT>
- To generate a component
ng generate component <componentName>
ORng g c <componentName>
- to generate other elements
ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
- Property binding - variables
- Event binding
- Two way binding - variable and event manipulation combined
- Directives - intructions for the DOM. E.g. For example it allow creation of new elements in DOM depending on the trigger. components are also directives
- *ngIf - structural directive, they add and remove elements
- Attribute directives don't add or remove elements, they only change the element they are placed on, such as:
- [ngStyle]="{ method or css expression}"