I am currently working on an Ionic 2 app and I am facing an issue with the click event.
When I test the app on a device and click on a button, let's say to trigger an alert, the function executes once. However, if I click on the button again, the function runs twice.
Here is the system information for reference:
Cordova CLI: 6.5.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.0
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: macOS Sierra
Node Version: v7.2.1
Xcode version: Xcode 8.3.2 Build version 8E2002
Below is a snippet of the code causing the issue:
home.htm
<div padding>
<button ion-button full (click)="TestAlert()">Alert</button>
</div>
home.ts
TestAlert(){
console.log('Hola');
alert('Hola');
}
For a more detailed example of what I'm working on, you can check out my GitHub repository here.