I am trying to toggle a div's visibility using a checkbox. I am trying to do this using reference variable, but could not figure out how to do it. I am trying to do something like below. I can`t get the checkbox value.
<input #changePasswordSwitch class="switch-input" name="changePassword" id="changePassword" type="checkbox" >
<div class="form-group row" *ngIf="changePasswordSwitch.value">
Show Some Data Here
</div>
Aucun commentaire:
Enregistrer un commentaire