I need to use this editable column to display a "test" variable :
<td contentEditable="true" ngDefaultControl [(ngModel)]="test">{{test}}</td>
My td element displays the initial value of "test", but when I edit the td (using my keyboard), "test" does not change.
I have tested the same thing using input, and it works :
<input id="myinput" name="myinput" type="text" [(ngModel)]="test">
So what is the problem ?
I tried this :
<td contentEditable="true" [textContent]="test" (input)="test=$event.target.textContent">{{test}}</td>
And it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With