ngx-template
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

NgxTemplate

License: MIT npm version

A strengthened angular template.

Usage

  1. Import

    import {NgxTemplateModule} from 'ngx-template';
  2. 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);
          }
      }
       

Readme

Keywords

Package Sidebar

Install

npm i ngx-template

Weekly Downloads

92

Version

1.1.1

License

none

Unpacked Size

83.8 kB

Total Files

21

Last publish

Collaborators

  • mokeyish