I'm facing an issue with a textarea where modifying its content does not update the textarea when the (change) event is triggered by code.
Here's an example:
app.component.html
<textarea #content (change)="dosomething(content.value)">{{ thecontents | json }}</textarea>
app.component.ts
thecontents;
dosomething(data) {
// this will overwrite whatever is already in the textarea
this.thecontents = { something : 'someother'};
}
The issue lies in the fact that the textarea does not update when the (change)
event is triggered.
How can this be fixed? Any suggestions?