Thanks. But how can I write a directive using the 2-way binding? I just learned Angular for a short time, really not good at writing some special directive, can you help me fix the example in the following link? :) Fiddle: http://jsfiddle.net/castiel_zyf/0hL4ucxf/
在 2015年3月18日星期三 UTC+8上午11:36:41,Sander Elias写道: > > Hi 庄奕峰, > > Well, actually you are using 1-way bindings. As you have found out, > changing the DOM underneath angular won't update the scope. Also relaying > on the $attrs subsystem might be a bit shaky in this case. > Also, your use of ngModel is actually not what you might expect. If you > want this, you need to write your own special 2-way binding. > > Too bad you didn't provide a plunk/jsbin/codepen. > > Regards > Sander > > -- 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 http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
