默认情况下折叠所有项目ng-bootstrap [英] Collapse all on items by default ng-bootstrap
本文介绍了默认情况下折叠所有项目ng-bootstrap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这里有2件事:实体管理和公司.
Have 2 things here: Entity management and company.
当前,当我单击实体管理时,公司将被隐藏.但是我想要的是公司在默认情况下会倒闭.
Currently when i click on entity management, company will be hidden. But what i want is company to be collapsed by default.
然后,当我单击实体管理时,它将显示.
Then when i click on entity management, it will show.
<li> <a (click)="isCollapsed=!isCollapsed" aria-controls="collapseExample"><i class="icon-interface-windows"></i>Entity Management</a></li>
<div id="collapseExample" [ngbCollapse]="isCollapsed">
<li><a routerLink="/job"> <i class="icon-interface-windows"></i>Company</a></li>
</div>
参考: https://ng-bootstrap.github.io/#/components/collapse/例子
推荐答案
在ts文件中添加
isCollapsed = true;
这篇关于默认情况下折叠所有项目ng-bootstrap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文