I get a strange error when using @Output
Output declaration
@Output() change: EventEmitter = new EventEmitter();
Emitting Value
this.change.emit('string');
Event listener
<selective (change)="getDataAreas($event)"></selective>
Do I forget someting?
When I add the last command (change) I always get this error to the console
TypeError: instance[output.propName].subscribe is not a function
FYI
The emit is inside this code
this.sub = this.searchField.valueChanges
.startWith('')
.debounceTime(200)
.subscribe((result) => {
this.change.emit(result);
});
this.searchField.valueChanges?@Output() change? Can you give more detail or maybe share the code of these 2 components (listener and emitter)?