I would like to use check boxes to select a parent object and then only show check boxes for a a property (array) on that object. For example i have an object of products and each product has a number of items. I want to show the check list of all items in the product but only if the product itself has been checked.
I tried the following code by it either shows or hides the items based on the initial value - i want to be able to toggle the check box on and off and hide or display the items.
<div *ngFor="let product of products; let i = index" #ref>
<md-checkbox type="checkbox"> {{product.productTitle}}</md-checkbox>
<div *ngIf="ref.checked">
<div *ngFor="let item of product.items; let i = index">
<md-checkbox type="checkbox">{{item.code}}</md-checkbox> - {{item.name}}
</div>
</div>
</div>
divand you are checking if it is checked. The div will never return true for checked correct? You need to reference your<md-checkbox>and check for checked there.