[formControl].valueChanges is not triggering
.html
<span>Test</span>
<input type="number" [formControl]="testForm">
.ts
testData: EventEmitter<any> = new EventEmitter<any>();
testForm: FromControl;
constructor() {
this.testForm = new FormControl();
}
this.testForm.valueChanges.subscribe(() => {
const data: any = {
value: this.testForm.value
}
this.testData.emit(data);
});
When the input changes, I'm attempting to emit the value, but it seems like there may be an issue as testForm.valueChanges is not being triggered. Is there something that needs to be adjusted in order for this to work correctly?