I am adding a plunkr too to understand better. As in the plnkr, you will see that the checkbox inside the red bordered box controls the activation and deactivation of the button 'Acknowledge All'. But I want that even a single checkbox checked should activate the button.
https://plnkr.co/edit/d0AEuEMuBjij0yrIm9Np?p=preview On Thursday, June 23, 2016 at 10:08:26 AM UTC+5:30, Ronaki wrote: > > In my template I have > > <div> > <label><input type="checkbox" [(ngModel)]="state" > [ngFormControl]="stateCtrl" (click)="call()"/> {{state}}</label> > </div> > <div *ngFor="let item of items"> > <my-item></my-item> > </div> > > > In my class I have > > > @ViewChildren(RandomClass) > children:RandomClass[]; > > > Now inside the constructor I have > > > this.stateCtrl = new Control(); > this.stateCtrl.valueChanges.subscribe( > data => { > this.children.forEach(child => { > child.state = data; > }); > }); > > > This gives me access to control all the items through the stateCtrl alone. > But I want to access each child of 'children' individually. Is there a way I > can use a subscribe on the 'children' to get their individual status change ? > > -- 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.
