funky-framadate-front/src/app/ui/erasable-input/erasable-input.component.ts

26 lines
545 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() inputModel;
constructor() {
}
ngOnInit() {
}
eraseInput() {
//
this.inputModelChange.emit('');
// TODO focus on other element
}
}