just add $scope.selectedAll = false; outside of your checkAll method, because all your checkboxes are trying to bind ng-checked to it, but the scope variable does not exist unless checkAll method is called.
On Saturday, April 30, 2016 at 4:49:07 PM UTC+5:30, Abhinav Pandey wrote: > > Here is the Plunker <http://plnkr.co/edit/yVnuWp?p=preview> Preview of > the problem. > > See the *First Condition *in *app.js* It is not working as expected. > > I'm uploading images here for a better understanding of the problem. > > > <https://lh3.googleusercontent.com/-bLsvEqpk3Ok/VySUKxp2xkI/AAAAAAAAAqI/Up-bRiTt83Y30D2dM5PwPKiO3u7Qy8gcQCLcB/s1600/so2.png> > > > <https://lh3.googleusercontent.com/-KO3gKYGCblE/VySUOeTAPnI/AAAAAAAAAqM/Dctl8N7iw44NuqnvQ74VbyogndWmnI8PwCLcB/s1600/so1.png> > > Checkout the difference between first image and second image. After > unchecking any of the slave checkbox, the master checkbox is getting > unchecked but just after that when you click the master checkbox again(see > the second image) that particular salve checkbox is still unchecked. Why? > > What I'm doing here is wrong? How to make this code working as expected? > -- 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.
