如果我将开关按钮的值更改为 false ,则将所有子模块的值更改为 false
<div class="content">
<md-slide-toggle color="primary" [(ngModel)]="permission.permission.department.main" [ngModelOptions]="{standalone: true}">On/Off</md-slide-toggle>
</div>
<div *ngIf="permission.permission.department.main" class="content">
<md-checkbox [(ngModel)]="permission.permission.department.view" align="end" [ngModelOptions]="{standalone: true}">View</md-checkbox>
<md-checkbox [(ngModel)]="permission.permission.department.add" align="end" [ngModelOptions]="{standalone: true}">Add</md-checkbox>
<md-checkbox [(ngModel)]="permission.permission.department.edit" align="end" [ngModelOptions]="{standalone: true}">Edit</md-checkbox>
<md-checkbox [(ngModel)]="permission.permission.department.delete" align="end" [ngModelOptions]="{standalone: true}">Delete</md-checkbox>
</div>