I\'m having a problem with trying to use Angular\'s *ngFor
and *ngIf
on the same element.
When trying to loop through the collection in th
As everyone pointed out even though having multiple template directives in a single element works in angular 1.x it is not allowed in Angular 2. you can find more info from here : https://github.com/angular/angular/issues/7315
solution is to use the as a placeholder, so the code goes like this
-
.....
but for some reason above does not work in 2.0.0-rc.4
in that case you can use this
-
.....
With updates, right now in 2018 angular v6 recommend to use
instead of
so here is the updated answer.
-
.....