Has v0.9.21 broken ng-click?

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
body
nav-bar
nav-view

// page.html
view
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?!

I think so… Here’s my code:

<list>
	<item ng-repeat="e in currentEvents" ng-click="selectEvent(e.id)">
		{{e.name}}
	</item>
</list>

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.

http://code.ionicframework.com

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:

@seanhill we set the version number ahead in master until the release, so that means .23 is still in pre-release but you get it if you pull from master.

So let me get this straight, the ng-click stuff isn’t working in the code that is in master right now?

I don’t believe it is working in .23.

It started with this thread re: .21. .22 fixed it. .23 I think has introduced a new problem…

Im getting the same bug in 0.9.22-alpha – there is no 0.9.23 tag in Github yet:

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