Hi all,
I’m having issues regarding ng-click firing twice on my buttons. I’ve been using the sidemenu app and started using sidemenu’s left and right at the same time. I’ve been changing a lot, but only recently noticed that my ng-click is actually firing twice! I’m very sure, since I’ve put up an alert in it.
There are a few topics on this forum already which describe problems that look really much the same, and I’m not sure whether it actually is.
Similair topics:
And
Also, it seems to be the same as issue #1022, which can be found here:
https://github.com/driftyco/ionic/issues/1022 although the issue is closed already.
I’m very curious about the problem. I have checked, and don’t see angularJs included multiple times, neither does App.run fire twice. I just started using the default application though, which is why I do not understand the problem. Can’t seem to find a solution either.
<button class="button button-stable button-full padding-top" data-ng-click="setAuthenticated(true);">OK
</button>
And in my controller:
$scope.setAuthenticated = function ( setting ) {
alert('test');
}
It is not related to any html markup (it’s actually failing the same way in either complex and simple html structures), nor is it related to a specific view.
However, I must notify about the absence of this problem when using a default checked out sidemenu starter app. I will be trying to reproduce this error tomorrow in a codepen snippet, but hoping for a fix by posting at this point.
(For now, the snippet which could be found in one of the related topics i mentioned before, exactly demonstrates what I am experiencing: http://codepen.io/anon/pen/Ffdtj/)
Specs:
Using Ionic, v1.0.0-beta.11
Browser reproducing the problem:
- Mozilla firefox 31.0
- Google Chrome 36.0.1985.143 m
- Google Canary 39.0.2136.0 canary (64-bit)
- Opera 23.0.1522.77 Stable
Tested on windows 8.1 64-bit (WoW64)
Native reproducing the problem: - Android stock browser
- Android mobile chrome
- Android hybrid cordova app
Tested on Samsung Galaxy S4 with android 4.4.2
Funny side note: Seems to be working fine in internet explorer 11.0.9600.17239