Skip to content

quanterion/ng-template

Repository files navigation

Angular Template Compiler Build Status npm version

Compile your Angular 2.x - Angular 8.x templates for print, emails, etc

Usage

let data = { name: 'Roman' };
let element = htmlToElement(`<div>{{name}}</div>`);
await compileTemplate(result, data);

Features

  1. string interpolation
  2. ng-template
  3. ng-container
  4. *ngIf + *ngIf as
  5. *ngFor
  6. [style.xxx]="value"
  7. [style.xxx.px]="value"
  8. [class.xxx]="value"