Using Angular2 beta 1, I'm trying to implement a 2-way data binding 
scenario between a directive and a wrapper component, but it seems to work 
in one direction only. Please find the sample repro at this Plunker: 
http://plnkr.co/edit/83NeiUCEpPvYvUXIkl0g . 

My scenario: a directive wraps the Ace code editor, and exposes a *text* 
property and a *textChanged *event. Then, an (XML) editor component uses 
this directive. It should be able to respond to changes in the underlying 
editor to update its XML code, and to set a new text in the underlying 
editor from its XML code. Thus, the editor's template binds the *[(text)]* 
property of the directive to the *xml* property of the editor component.

Anyway, this works only partially: when I type something in the Ace editor 
included in the directive, the text change is not reflected in the bound 
*xml* property (see the *{{xml}}* interpolation for diagnostic purposes 
just below the control); when I set the *xml* property instead (click the *set 
XML *button in the sample), the text is changed. How can I correctly 
implement a full 2-way data binding here?

-- 
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.

Reply via email to