와 그것을 가능해야 사용할 수있는, 어느 하나가 링크 나에게 보내 주시기 바랍니다보다 데모를 같이 보았다 그래서 구현해야하는 날을 제안 하나 : tree view component
또는 당신은 할 수 자신을 위해 하나를 구현하십시오. 기본적으로 onclick 당신은 childrens 표시 속성을 변경해야합니다.
<button (click)="item.expand(item)">
<md-icon>{{item.icon}}</md-icon>
{{item.text}}
</button>
<div *ngFor="let child of item.children">
<button [ngClass]="{'hidden' : !child.visible}">{{child.text}}
</button>
</div>
확장 기능 on item.children의 visible 속성 및 change items 아이콘을 토글합니다.
item = {
text: "Folders"
icon: "keyboard_arrow_button"
children: [{text: Subfolders, visible: false}]
}
.hidden{
display: none;
}