Thanks Alain for finding the typo! Thanks Sander for the tip on ngModelController.$setViewValue(). I've implemented both changes. Onward my lessons in Angular.js go!
Michael J. Mahony Personal Trainer ISSA Certified http://fastfitnessonline.com On Wed, Aug 5, 2015 at 6:37 PM, Sander Elias <[email protected]> wrote: > Hi Michael, > > I noticed the $scope.$apply in your directive. It does what you think, > but it also refreshes every binding in your page, which may be very costly. > As you have an ngModel, you don’t need it at all. I updated your fiddle > <http://jsfiddle.net/jdz0vvkv/3/>a bit to show you how to use > ngModelController.$setViewValue(). This is much better, as it updates > only the value at hand, and will not trigger a full $digest. > > Hope this helps you a bit, > Regards > Sander > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "AngularJS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/angular/6fRdWlYLyKA/unsubscribe. > To unsubscribe from this group and all its topics, 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. > -- 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.
