import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; @Component({ selector: 'of-key-value', templateUrl: './key-value.component.html' }) export class KeyValueComponent implements OnInit { @Input() key: string; @Input() value: any; @Input() clickable = false; @Output() click = new EventEmitter(); constructor( ) { } ngOnInit() { } onClick() { this.click.emit(this.value); } }