Enhanced *ngIf and *ngFor in Angular Version 4.0.0

Ever wanted an “else" statement in *ngIf ? It’s finally here, together with some other nice improvements around dealing with Observables in templates. Let’s explore them here.
The ngIf directive gets a nice improvement in Angular version 4.0.0. It’s been the target of many critiques even in AngularJS (v1.x) because of the lack of an “else” clause. In order to simulate if-then-else blocks in Angular templates, we had to use two ngIf directives with opposed boolean conditions.

Link: https://dzone.com/articles/enhanced-ngif-and-ngfor-in-angular-version-400?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev