【发布时间】:2018-11-10 21:30:40
【问题描述】:
app.module.ts 是根模块。
它有 2 个子模块 - 1. table.module.ts 和 2. status.module.ts
Table 组件是 ngx-datatable 的包装器。我需要将下面的模板从 status.component.ts 传递给 table.component.ts:
<ngx-datatable-group-header *ngIf="groupRowsBy" >
<ng-template let-group="group" let-expanded="expanded" ngx-datatable-group-header-template>
<span>
<button (click)="showStatus(group)">{{group.key}}</button>
</span>
</ng-template>
</ngx-datatable-group-header>
我尝试在 table.component.ts 中使用<ng-content></ng-content> 并从 status.component.ts 传递上面的模板
但它不起作用。谁能建议如何通过这个模板?
提前致谢
【问题讨论】:
标签: angular typescript angular2-template siblings