24 lines
447 B
TypeScript
24 lines
447 B
TypeScript
|
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: string;
|
||
|
@Input() clickable = false;
|
||
|
@Output() click = new EventEmitter<string>();
|
||
|
|
||
|
constructor(
|
||
|
) { }
|
||
|
|
||
|
ngOnInit() {
|
||
|
}
|
||
|
|
||
|
onClick() {
|
||
|
this.click.emit(this.value);
|
||
|
}
|
||
|
}
|