import { Component, ChangeDetectionStrategy, ViewEncapsulation, ElementRef, Input, ContentChild, ContentChildren, NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { Header, Footer, PrimeTemplate, SharedModule } from 'primeng/api'; class Card { constructor(el) { this.el = el; } ngAfterContentInit() { this.templates.forEach((item) => { switch (item.getType()) { case 'header': this.headerTemplate = item.template; break; case 'title': this.titleTemplate = item.template; break; case 'subtitle': this.subtitleTemplate = item.template; break; case 'content': this.contentTemplate = item.template; break; case 'footer': this.footerTemplate = item.template; break; default: this.contentTemplate = item.template; break; } }); } getBlockableElement() { return this.el.nativeElement.children[0]; } } Card.decorators = [ { type: Component, args: [{ selector: 'p-card', template: `