dimanche 7 janvier 2018

mat-checkbox and ngIf in angular 5 is not working

I have this code to hide and show a piece of content every time a checkbox is ticked and unticked. However, it is not working.

<mat-checkbox ngModel="checked" ngInit="checked=true">Check me!</mat-checkbox>
            <div *ngIf="checked">
                    <mat-radio-group formControlName="contactSupport">
                            <mat-radio-button value="Low">Low</mat-radio-button>
                            <mat-radio-button value="Normal">Normal</mat-radio-button>
                            <mat-radio-button value="high">high</mat-radio-button>
                            <mat-radio-button value="none">None</mat-radio-button>
                    </mat-radio-group>

            </div> 




Aucun commentaire:

Enregistrer un commentaire