@fgilde/ngx-template
v1.1.1
Published
A strengthened angular template
Downloads
16
Readme
NgxTemplate
A strengthened angular template.
Usage
Import
import {NgxTemplateModule} from 'ngx-template';
Getting Started
- set template name or type
<ng-template ngxTemplate="fontSize" [type]="'node'" let-p> <input type="number" placeholder="Value" [(ngModel)]="p.value"> </ng-template>
- get template by name or type
export class SomeComponent { @ContentChildren(NgxTemplate) templates: QueryList<NgxTemplate>; public getTemplateByName(name: string): TemplateRef<any> { return this.defaultTemplates.find(o => o.name === name); } }
- set template name or type