Построить список этих динамически генерируемых компонентов. Настоятельно рекомендую проверить это!
бъявитьдинамический переменная шаблона внутриngFor
элемент?
Я хочу использовать компонент popover из ng-bootstrap, код popover (с привязкой Html) выглядит так:
<ng-template #popContent>Hello, <b>{{name}}</b>!</ng-template>
<button type="button" class="btn btn-secondary" [ngbPopover]="popContent" popoverTitle="Fancy content">
I've got markup and bindings in my popover!
</button>
Как я могузаворачивать эти элементы внутриngFor
?
<div *ngFor="let member of members">
<!-- how to declare the '????' -->
<ng-template #????>Hello, <b>{{member.name}}</b>!</ng-template>
<button type="button" class="btn btn-secondary" [ngbPopover]="????" popoverTitle="Fancy content">
I've got markup and bindings in my popover!
</button>
</div>
Хммм ... есть идеи?