**ion-toggle ionChange** get called multiple times in ionic. I have tried using different techniques to solve it but I am not successful.

**Code 1:**

```
     <ion-toggle
        (ionChange)="changeData()"
        color="success"
        checked="{{data}}"
      >
     </ion-toggle>

```

**Problem: When I used code 1 then ionChange get called multiple time and it does not show correct state first time.**

**Code 2:**

```
     <ion-toggle
        (ionChange)="changeData()"
        color="success"
        [(ngModel)]="data"
      >
    </ion-toggle> 

```

**Problem: Code 2 causes infinite loop. It calls ionChange infinitly.**

If anybody has faced similar issue and/or anybody knows how to tackle it then please let me know. Thanks