I have a list of checkboxes as shown below:
<div class="col-md-4 md-padding-s" *ngFor="let node of nodeList; let j=index;">
<md-checkbox>
<md-checkbox
class="md-h6 row md-padding--xs"
name="{{node.abc}}"
label="{{node.abc}}"
value="{{node.abc}}"
required="true"
htmlId="filter_label_{{a}}_{{j}}"
(ngModelChange)="updateSelection(node)"
[formControlName]="servers"
[(ngModel)]="node.selected">
</md-checkbox>
</md-checkbox-group>
</div>
Now, the checkbox has to be checked or unchecked based on node.selected value. But what is happening is when I click on the checkbox text the node.selected value has to change based on updateSelection function which is currently happening. But the checkbox is not getting checked or unchecked when I click on the surrounding text. Only if I click on the checkbox , the value is getting checked/unchecked. Where am I going wrong?