Has v0.9.21 broken ng-click?


I upgraded from .20 to .21 and everything seemed ok in Chrome.

Then I ran my app on my phone and ng-click seems to have been broken (probably the touch aspects of it). I downgraded ionic.js and ionic-angular.js and it started working again.

I then upgraded only ionic.js and it continued to work. Then ionic-angular.js and it stopped again.

However when I added overflow-scroll="true" clicks started working again…rather peculiar.

Fixes for tap/click events ready for testing

Hey @gregorypratt, thanks for letting us know. I’m going to link in @adam on this as he removed ngTouch and that might have had an impact.


Are you noticing that ng-click is firing twice? Not sure if this is related to your problem (I’m seeing this on Android 4.3), but it’s occuring on certain (not all) ng-click directives I have in my app. I’m on 0.9.21 and works fine in Chrome.


The click firing twice is the big issue we are looking at right now.

@gregorypratt when you say it isn’t working, what exactly are you noticing? Also which device and platform is this on? Thanks!


@max Great, glad to know you guys are aware of it. I’ve been using Ionic for a few days now, and other than this, I love it. Keep up the good work!


@max I think it’s either not firing on touch or being intercepted before it hits the function on my controller. I have a relatively simple setup:

// index.html

// page.html
content ng-hide="loading"
div ng-repeat item in items track by $index
div ng-click="openItem(item)"

Click either works (ionic-angular.js v.20) or doesn’t (ionic-angular.js v.21). And to confuse matters if I add overflow-scroll to the content directive it starts to work again…

I noticed it first on the emulator but its the same on my actual phone. I quickly added an alert inside the controller function openItem and it gets hit and performs its job when on v.20.

On v.21 however it never reaches the function.

Google Chrome - works
iPhone 4S iOS7 - doesn’t work
iPhone/iPad emulators - doesn’t work


Anyone else experiencing this problem btw?!

Side Menu with Navigation using router Demo

I think so… Here’s my code:

	<item ng-repeat="e in currentEvents" ng-click="selectEvent(e.id)">

Works great in Chrome on my laptop, but wrapped in PhoneGap 3.3 and put it on my iOS7 iPod Touch and my iOS6 iPad Mini and the click handler does not run for either of them.


Maybe try 0.9.22 ? Fixes for tap/click events ready for testing

However, it has broken ng-click for me…


I’m having this same issue too, but it’s not consistent. Some ng-click’s work great, but in a basic grid I built with the row, col classes I have

<div class="col" ng-click="doSomething()">...</div>

It fires fine in my browser, but on an emulator and actual phone, it doesn’t fire.


This was solved for me in the latest release build btw…


Hey Gregory, latest release of Cordova or Ionic? I’d assume Ionic :slight_smile: I’m using 0.9.21 right now.


Yeah going from 21 to 22 fixed it for me…I’d give that a go


Ug, I just upgraded to 0.9.23-alpha and it’s still not working :frowning: It’s fine in google chrome, but doesn’t work in the emulator or phone.


I’m getting an error with ng-click in 0.9.23 with

function onTap(e) {
      // wire this up to Ionic's tap/click simulation
      ionic.clickElement(e.target, e);

Uncaught TypeError: Object #<Object> has no method 'clickElement'

I looked in ionic.js and there is no clickElement function.


How about .22? If it works in 22 and not in 23 then it’ll help the Ionic chaps to debug…


I tried downloading .22 from the homepage, but all the files in there are for 0.9.23, any ideas where to find the actual .22 source? Thanks man.




Perfect thank you, it’s working properly now. Dear awesome Ionic creators, the download link on the homepage is not for .22 it’s for .23-alpha :smile:


Ahhh!! Thank you @seanhill (and @gregorypratt). We’re on it! :slight_smile: