Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 角度cli+;ngx引导:acive多模态_Twitter Bootstrap_Angular_Ngx Bootstrap - Fatal编程技术网

Twitter bootstrap 角度cli+;ngx引导:acive多模态

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> <

我有一个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>

       <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