forked from tykayn/funky-framadate-front
32 lines
651 B
TypeScript
32 lines
651 B
TypeScript
|
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
||
|
|
||
|
@Component({
|
||
|
selector: 'framadate-erasable-input',
|
||
|
templateUrl: './erasable-input.component.html',
|
||
|
styleUrls: ['./erasable-input.component.scss']
|
||
|
})
|
||
|
export class ErasableInputComponent implements OnInit {
|
||
|
|
||
|
@Output() inputModelChange = new EventEmitter();
|
||
|
|
||
|
@Input() get inputModel() {
|
||
|
return this.inputModel;
|
||
|
}
|
||
|
|
||
|
set inputModel(val) {
|
||
|
// this.inputModel = val;
|
||
|
}
|
||
|
|
||
|
constructor() {
|
||
|
}
|
||
|
|
||
|
ngOnInit() {
|
||
|
}
|
||
|
|
||
|
eraseInput() {
|
||
|
this.inputModel = '';
|
||
|
this.inputModelChange.emit(this.inputModel);
|
||
|
}
|
||
|
|
||
|
}
|