Element button click event does not work with ion

I need to pass the click event from the controller, so I used this code:

angular.element(document.querySelectorAll('#cal')).triggerHandler('click'); 

In my browser it works when the ion signal is applied, but it does not work on mobile devices

+5
source share
1 answer

You can write this way in your controller.

 angular.element(document).ready(function () { angular.element(document.querySelectorAll('#cal')).triggerHandler('click'); //OR angular.element(document.querySelectorAll('#cal')).trigger('click'); }); 
+2
source

All Articles