Since I'm using ion-router my input fields i.e checkbox seems to keep its value since the component is not destroyed when I'm navigating through the same hierarchy. Whenever ngOnDestroy() is called and I go back to the view it works as required i.e checkbox value is set to default. So I need some way where I can grab the value from the input field and change it to default i.e false in ionViewWillEnter(), for cases when I'm in the same navigating hierarchy.
This is my HTML code:
<div class="d-flex justify-content-between border-bottom p-2">
<label translate="Test"></label>
<input class="align-middle" type="checkbox"/>
</div>
Aucun commentaire:
Enregistrer un commentaire