bixi
Version:
企业级中后台前端解决方案
25 lines (20 loc) • 861 B
text/typescript
import { ChangeDetectionStrategy, Component, Input, OnInit, TemplateRef } from '@angular/core';
import { NzSafeAny } from 'ng-zorro-antd/core/types';
import { EBixiCustomTplType, ICol } from '../table.type';
import { ColTemplateService } from './col-template.service';
({
selector: 'bixi-table-col-template-header',
host: { '[class.bixi-table-col-template]': 'true' },
template: `
<ng-template [ngTemplateOutlet]="outletRef"></ng-template>
`,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class BixiTableColTemplateHeaderComponent implements OnInit {
() col: ICol;
outletRef: TemplateRef<NzSafeAny> | undefined;
constructor(private colTemplateService: ColTemplateService) { }
ngOnInit() {
this.outletRef = this.colTemplateService.getTemplateRef(this.col.nameRef || '', EBixiCustomTplType.header);
}
}