Used different ways of binding in Angular. Interpolation and event binding.
Used event binding to change wish message.
Created one product item. We can change the amount of products pushing '-' and '+' that also counts total value price * amount.
Used built-in structural directive *ngFor to loop the array of product items.
Created Input form. Binded input data with text field using our own function updateInput().
Used ngModel attribute directive for two-way binding.
Component contains textarea to write a message. Used two-way binding to bind textarea with message variable.
Used attribute binding to switch iput type between "text" and "password".
Used input type "range" to set up the price.
Used input type "checkbox" role "switch" to switch to Dark theme and back. We change the theme with changing classes using class binding
Created a registration form.
interface User{ name : string; email : string; password : string; designation : string; bio : string; terms : boolean; }
print to the console a new Object with Interface User from the filled registration form.
Depending on isLoggedIn boolean we show 'Thank you' and Login Button or 'Welcome Alex' and Logout button. Used ngIf directive.
Comparing with shopping-cart Component, now we receive product item data from product Component.
Used
- uppercase
- titlecase
- number
- date
- currency
- json
pipes to display data the way we want
Created user service to get data from API (jsonplaceholder). Used subscribe method to receive data from Service to Component.