Hi Sander, Hope you are doing good.
Thank you for the implementation, removing usage of scope does make a lot of sense along with wrapping respective directives into a parent directive to handle events. With this implementation the child element's viewValue gets clear on check event not on uncheck. However, by using ng-show we can accomplish it. The reason behind it could be the element is not rendered on to the screen with false condition, please correct me if I am wrong. Is there any way we can use ng-if too, and clear the child elements value on uncheck event? I have created plunker based on your plunker - link <http://plnkr.co/edit/PlQ3aJSyUI6jqrb1Jiqq?p=preview>. Thank you, Anurag. On Thursday, March 19, 2015 at 10:52:08 PM UTC+5:30, Sander Elias wrote: > > Hi Anurag, > > I rewrote it a bit. > > - no more $scope > - also no watches > - no scope apply needed for updating your scope data from an event > outside angular!! > - replaced the service with an directive > - all directives operate under private scope. > > have a look at the new plunk > <http://plnkr.co/edit/2UOHexn1kPkKO0ikm8Ni?p=preview> > > 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.
