I have a component where there is a textarea. I need to capture a value change in the textarea, then send it to server as PUT request(update). I do not want to update the value on text area lost focus, but rather a auto-save function.
I have seen several articles showing auto-save to the entire form. But I need to auto-save only this particular field's text content.
I came up with a code segment as below, but within it I need to capture the textarea (either by id or etc):
this.subs.add(this.INeedToCaptureFieldById
.pipe(debounceTime(2000), distinctUntilChanged())
.subscribe(() => {
this.updateContent();
}));
How to capture the textarea in Angular, but couldnt figure a way. how to capture the textarea "INeedToCaptureFieldById"