Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70919

Ion-toggle (ionChange)

$
0
0

@dpark1985 wrote:

I have a problem with ion-toggle (ionChange)

Browser stops when i try to navigate to the page where it contains<ion-toggle> with (ionChange)

If i remove (ionChange), the app works find, but with (ionChange) doesn't work.

here is the code

<ion-toggle color="primary" [(ngModel)]="alertEvent" (ionChange)="alertEventChange()"></ion-toggle>

alertEventChange() {
(this.alertEvent)? this.alertEvent=false: this.alertEvent=true;
this.userData.changeEventAlertStatus();
}

this code works find if (ionChange) is removed.

How can I use ionChange???
Thank you

this is my ionic info

Cordova CLI: 6.2.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.8.6
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v5.0.0
Xcode version: Xcode 7.3.1 Build version 7D1014

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 70919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>