*ngIf and *ngFor on same element causing error

后端 未结 16 2264
自闭症患者
自闭症患者 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条回答
  •  醉梦人生
    2020-11-22 03:07

    Table below only lists items that have a "beginner" value set. Requires both the *ngFor and the *ngIf to prevent unwanted rows in html.

    Originally had *ngIf and *ngFor on the same tag, but doesn't work. Added a

    for the *ngFor loop and placed *ngIf in the tag, works as expected.

    {{lesson.description}} {{lesson.duration}}

提交回复
热议问题