I see that same ...
so I did this
-------------------------------------------------------------------------------------------------------------------
this.editor.on("change", (e:any) => {
this.ndx++;
if(this.ndx === 10){
return;
}
let s = this.editor.getValue();
if(s.length !== 0){ //<--------------------check the length of the string
sent back
this.textChanged.emit(s);
}
});
-----------------------------------------------------------------
and that seems to fix the race condition
On Sunday, January 17, 2016 at 1:36:41 AM UTC-5, Naftis wrote:
>
> Thank you, this fixed the issue, I had misinterpreted the docs when they
> say that the [(...)] notation is conceptually equivalent to a [...] plus a
> (...) notation so I thought I had not to add the event handler explicitly.
> Anyway, this now poses *another problem*: try *first *typing something in
> the editor, and *then *clicking the SET XML button: now the editor
> flickers in an endless loop, as the change on one side is reflected on the
> other side, and vice-versa, so that Angular seems stuck in a circular
> update. This also happens if you type something, select a part or whole the
> typed text, and type something else, thus replacing the selection. How
> could I solve this?
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.