Icon at right hand side of list (ng-click)


#1
<li class="item item-icon-right" ng-click="actionOne()">
 {{Title}} <i class="icon ion-share" ng-click="actionTwo()"></i> 
</li>

Okay so this is the piece of code I’m currently working with, trying to fire just actionTwo when the icon at the right hand side is clicked but when I try this it is still calling both, is there any workaround so that it just calls actionTwo?

Cheers,
Aaron


#2
<li class="item item-icon-right">
   <div ng-click="actionOne()">{{Title}} </div>
   <i class="icon ion-share" ng-click="actionTwo()"></i> 
</li>

This could be one solution. But there might be some other ways also.


#3

Below is one way:
You can give a unique id to and then using jQuery use that id in order to trigger the click event

$( “#target” ).click(function() {
alert( “Handler for .click() called.” );
actionTwo();
});

not sure what scripting are you using.


#4
ng-click="actionTwo(); $event.stopPropagation()"