Break NgFor Loop in Angular 2

前端 未结 3 1448
[愿得一人]
[愿得一人] 2021-01-11 16:24

I am trying to iterate array using *ngFor inside the template and searching for an element based on the key, using *ngIf. Now when the condition is matched with

3条回答
  •  -上瘾入骨i
    2021-01-11 17:27

    There is no option to break ngFor. You can use a custom pipe that doesn't return values after the element where the condition is met.

    For more concrete approaches please provide more concrete information about what you actually try to accomplish.

提交回复
热议问题