H
H
HlushkoArthur2020-05-30 02:17:20
Angular
HlushkoArthur, 2020-05-30 02:17:20

How to use two angular directives in one tag?

You need to use two directives in one tag. *ngFor && *ngIf, how can I do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2020-05-30
@HlushkoArthur

It is impossible, structural directives are those by design.
Use

<ng-container *ngIf="...">
  <div *ngFor="..."></div>
</ng-container>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question