Ionic triggers of unwanted ng-clicks by right-clicking and middle-clicking

I use Ionic in the latest version of Chrome and Chrome canary for some reason ODD Right click to call ng-click .

Pen code showing problem

can anyone shed some light?

+8
angularjs ionic-framework angularjs-ng-click
source share
1 answer

Change your Button tag,

  <button type="button" class="button button-large button-energized" ng-click="test()">click me!!!</button> 

or

<button type="button" class="button button-large button-energized" ng-click="test($event)">click me!!!</button>

and on your controller:

 $scope.test = function($event){$event.preventDefault();alert(1); 

Hope this helps.

0
source share

All Articles