Twitter bootstrap 角度cli+;ngx引导:acive多模态
我有一个for循环,在这个循环中有多个元素需要一个模态Twitter bootstrap 角度cli+;ngx引导:acive多模态,twitter-bootstrap,angular,ngx-bootstrap,Twitter Bootstrap,Angular,Ngx Bootstrap,我有一个for循环,在这个循环中有多个元素需要一个模态 <ng-container *ngFor="let nut of allnutrients; let i=index"> <span class='info-link'><span (click)="staticModal.show()" class="glyphicon glyphicon-info-sign"></span></span> <
<ng-container *ngFor="let nut of allnutrients; let i=index">
<span class='info-link'><span (click)="staticModal.show()" class="glyphicon glyphicon-info-sign"></span></span>
<div class="modal fade" bsModal #staticModal="bs-modal" [config]="{backdrop: 'static'}" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
....
</div>
</ng-container>
....
但是很明显,这段代码不起作用,因为#statimodel被多次定义
如何根据{{nut.name | lowercase}}或索引I以编程方式创建modals