I have and ion-list
with ion-item
's in it. Each ion-item
has a ng-click
…the ng-click
event handler is never firing. Please note this is inside of a ion-side-menu-content
.
For testing’s sake, I also put a regular button
in the same controller, with an ng-click
and it is not working as well. I disabled drag-content
thinking it may have something to do with the side-menus.
I recently updated from the first version of alpha to beta-5b. I am running Kit Kat.
I have tried this on the browser and even made a plnkr (http://run.plnkr.co/gbHtedsC7L7WpsNz/) but they worked! My app is still not working…not even an onclick
written inline is working. This had not been in an issue before the recent update.
Any suggestions are appreciated!
Hmm, what version of ionic are you using?
I’m using the nightly builds and all is good.
Did you ever get this one figured out. I’m seeing the same behavior.
@martin_spriggs What version of ionic are you using? Could you provide a codepen?
@mhartington I’m using the latest beta. Here is a codepen. Try clicking on the “Read” icon in the side menu.
CodePen: http://codepen.io/mspriggs/pen/fedob
Now it works. Needs restyling.
<ion-item class="item-icon-left" ng-click="showsubs = !showsubs">
<i class="icon ion-android-book"></i>
Read
<ion-list><ion-item ng-show="showsubs">Test</ion-item></ion-list>
</ion-item>
Thanks @rafaellop, but I need it to appear as a regular list item below the current item in an accordion style fashion.
@mhartington Any suggestions? I’m still stumped on this one. I can put the ng-click in a regular div or an item tag and it will work as I expect. I just seems that within an ion-item tag it does not.
Hmm, not sure what to make of this, can you open an issue for this?
Hi,
Replace ion-item tag with div and use item class in that div.
Hello,
Use object variable in ng-click.Then it will start working.