@Component({
selector: 'app-input',
template: `
<input type="text" [formControl]="form" class="form-control">
`,
})
export class AppInput {
@Output() value = new EventEmitter();
form;
ngOnInit() {
this.form = new FormControl();
this.form.valueChanges.subscribe(val => {
this.value.next(val);
});
}
}