2018-04-18 12:56:57 +00:00
|
|
|
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;
|
2018-06-14 07:42:04 +00:00
|
|
|
@Input() value: any;
|
2018-04-18 12:56:57 +00:00
|
|
|
@Input() clickable = false;
|
|
|
|
@Output() click = new EventEmitter<string>();
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
) { }
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
}
|
|
|
|
|
|
|
|
onClick() {
|
|
|
|
this.click.emit(this.value);
|
|
|
|
}
|
|
|
|
}
|