【发布时间】:2021-01-02 08:01:42
【问题描述】:
我有后端数据显示,但我正在尝试使用扩展面板呈现数据,但不知道该怎么做,如果我能得到任何建议或帮助,我将不胜感激。
TS
constructor(private HelpService: HelpService) {}
helpSection: {[key: string]: HelpSection } = {};
helpSection$ = this.HelpService.getHelpSection();
ngOnInit(): void {
this.HelpService.getHelpSection().subscribe(() => {
} )
}
HTML
<mat-expansion-panel>
<mat-expansion-panel-header style="align-items: center;">
<div *ngFor= "let help of helpSection$ | async">{{help.sectionName}}</div>
</mat-expansion-panel-header>
<a mat-list-item (click)="clicked(1)">Here it will display subSections</a>
</mat-expansion-panel>
【问题讨论】:
标签: html angular typescript api rendering