import { Component, OnInit, ViewChild, TemplateRef, Output, EventEmitter } from '@angular/core'; @Component({ selector: 'hbor-templates', templateUrl: './templates.component.html', styleUrls: ['./templates.component.css'] }) export class TemplatesComponent implements OnInit { @Output() buttonViewClick: EventEmitter = new EventEmitter(); @ViewChild('templateLeft') public templateLeft: TemplateRef; @ViewChild('templateRight') public templateRight: TemplateRef; @ViewChild('templateImage') public templateImage: TemplateRef; @ViewChild('templateDate') public templateDate: TemplateRef; @ViewChild('templatePercent') public templatePercent: TemplateRef; @ViewChild('templateButtonView') public templateButtonView: TemplateRef; constructor() { } ngOnInit() { } onRowButtonClickView(row) { this.buttonViewClick.emit(row); } }