动态手风琴显示相同的数据

时间:2019-01-19 09:36:22

标签: angular routes

<accordion *ngIf="isResponsive">

            <ul>
              <li style="list-style-type: none" *ngFor="let tab of tabs; let index = index">
                  <a class="nav-link" [ngClass]="{'active':index==0}" href="javascript:void(0)"  data-toggle="modal" [routerLink]="tab.path">
                    <accordion-group heading="{{tab.title}}">
                      <div class="tab-content">
                        <div class="tab-pane active">
                          <router-outlet></router-outlet>
                        </div>
                      </div>
                    </accordion-group>
                  </a>
              </li>
            </ul>
          </accordion>

tabs:动态-来自控制器。只是一个对象数组。

0 个答案:

没有答案