I have the following code:
<button tappable (click)="test()" ion-button >
test
</button>
<button tappable (click)="test2()" ion-button >
test2
</button>
test() {
alert('here');
}
test2() {
alert('test 2');
}
Now when I click in one of the buttons I get one alert. If I click on the other button I get alert from the previous click and the alert for the current click.
Why is this happening?