是否可以将 nglAccordionSection 手风琴的标签作为组件或 html 元素而不仅仅是文本?

Is it possible to have the label of an nglAccordionSection accordion as a component or html element instead of just text?

我想使用 Ng-lightning 在 Angular 中创建嵌套 table。我正在尝试通过在手风琴内部添加 tables 来做到这一点。

但是,我似乎找不到将 nglAccordionSection 的标签设置为组件或元素而不仅仅是文本的方法。

除了向手风琴添加 table 之外的其他解决方案也欢迎。

检查 http://ng-lightning.github.io/ng-lightning/#/components/accordion 中的“自定义可重用 header”示例。在那里你可以看到你可以使用 ng-template 作为 [label].

的值

例如:

<ng-template #header>html header</ng-template>
<ul ngl-accordion [(activeName)]="active">
  <ng-template nglAccordionSection name="A" [label]="header">Content area</ng-template>
</ul>