ohayolibs
Version:
Ohayo is a set of essential modules for ohayojp.
17 lines (13 loc) • 515 B
text/typescript
import { Directive, Input, OnInit, TemplateRef } from '@angular/core';
import { SF_SEQ } from '../../const';
import { SFComponent } from '../../sf.component';
({
selector: '[sf-template]',
})
export class SFTemplateDirective implements OnInit {
('sf-template') path: string;
constructor(private templateRef: TemplateRef<void>, private table: SFComponent) {}
ngOnInit(): void {
this.table._addTpl(this.path.startsWith(SF_SEQ) ? this.path : SF_SEQ + this.path, this.templateRef);
}
}