ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Ionic2: Skip initial emit of ionChange on checkbox with [(ngModel)]

Open tyftler opened this issue 10 years ago • 1 comments

In Ionic 2 using a checkbox with [(ngModel)] and an ionChange event causes this event to be fired when the initial value through ngModel is loaded when initializing the page. There should be an ability to only register an actual change of the bound value, without being fired when the page is loading.

<ion-checkbox [(ngModel)]="myModel" (ionChange)="doSomethingWhenModelActuallyChanges()">
</ion-checkbox>

tyftler avatar Aug 23 '16 10:08 tyftler

Hello, thanks for opening an issue with us! As this seems to be the same issue as #7806 just with a different component i am going to close this issue as a duplicate of that issue. Thanks for using ionic!

jgw96 avatar Aug 23 '16 14:08 jgw96