Here is one of the versions that I tried INSIDE TEXTAREA: (change)="dosomething($event)"
and it's not doing anything. What is the directive for "change"?
Here is one of the versions that I tried INSIDE TEXTAREA: (change)="dosomething($event)"
and it's not doing anything. What is the directive for "change"?
You should be using ngModelChange
<textarea cols="25" [ngModel]="data" (ngModelChange)="doSomething($event)"></textarea>
Update:
(change)
event will work in textarea but it is triggered on blur and text
changed inside the text area
(change) didn't work for me neither, try (input) it worked perfectly :
<textarea [(ngModel)]="mytext" (input)="autoGrow($event)"></textarea>
© 2022 - 2024 — McMap. All rights reserved.