jeudi 30 novembre 2017

Set value of ion-input to null when ion-checkbox is unchecked without [(ngModel)] angular 2 ionic 2

I want to empty ion-input value when I uncheck ion-checkbox.

<ion-item>
    <ion-label class = "Price">Fixed Price
        <ion-checkbox #FixedPrice></ion-checkbox>
    </ion-label>
</ion-item>
<ion-item>
    //I want to do something like that.
    <ion-input [value = ""]  = "!FixedPrice.checked"></ion-input>
    // i.e when I uncheck the ion-checkbox it should set the value of ion-input to "".
</ion-item>

If you need something else let me know.




Aucun commentaire:

Enregistrer un commentaire