import { Component, Input } from "@angular/core"; import { BHPCardConfig } from "./card.config"; @Component({ selector: "BHPCard", template: `

` }) export class BHPCardComponent { @Input() title: string = ""; @Input() titleTag: string = ""; constructor(_config: BHPCardConfig) { Object.assign(this, _config); } generateTitle() { if (this.title.length > 0) { let tag = "h5"; if (this.titleTag.length > 0) { tag = this.titleTag; } return ` <${this.titleTag} class="card-title"> ${this.title} `; } return ""; } }