Closed moniuch closed 7 years ago
I don't know whether it's a bug or by design, but I am getting double calback from ngModelChange.
ngModelChange
While experimenting with the codemirror element suggested usage, I took the banana out of the box, as in:
<codemirror #editor [ngModel]="code" (ngModelChange)="onChanged($event)" [config]="config"></codemirror>
onChanged($event){ console.log('onChanged', $event); this.codeOut = $event; }
and I am getting double console.log on every change (keystroke or paste).
I don't know whether it's a bug or by design, but I am getting double calback from
ngModelChange
.While experimenting with the codemirror element suggested usage, I took the banana out of the box, as in:
<codemirror #editor [ngModel]="code" (ngModelChange)="onChanged($event)" [config]="config"></codemirror>
and I am getting double console.log on every change (keystroke or paste).