*ngIf and *ngFor on same element causing error

后端 未结 16 2414
自闭症患者
自闭症患者 2020-11-22 02:37

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

16条回答
  •  猫巷女王i
    2020-11-22 03:09

    Updated to angular2 beta 8

    Now as from angular2 beta 8 we can use *ngIf and *ngFor on same component see here.

    Alternate:

    Sometimes we can't use HTML tags inside another like in tr, th (table) or in li (ul). We cannot use another HTML tag but we have to perform some action in same situation so we can HTML5 feature tag