If-Then-Else construction In Angular

In Angular, using ngIf structural directive, we can achieve if-then-else functionality like below: myComponent.html: <p *ngIf=“myProperty ; else elseTemplate”> This element is rendered if myProperty is true </p> <ng-template #elseTemplate> <p> This element is only rendered if myProperty is false </p> </ngTemplate> myComponent.ts … … export myComponent {  myProperty: boolean = false; } ==============================   … More If-Then-Else construction In Angular

ArDevCo

I will soon start blogging on this page about my daily tasks. This page is mainly intended to share my experiences to help other people to save time and effort as well as to use as a memory support for myself to copy-past my repetitive tasks.