I have a modal in my Ionic app and when modal is shown, I want to trigger click event on specific element.
Controller
$scope.$on('modal.shown', function() {
document.getElementById('somemodal').click(); // #1
$( "#somemodal" ).triggerHandler( "click" ); // #2
});
Index.html
<h1 class="title" id="somemodal" ng-click="start()">info</h1>
Both #1 and #2 do not trigger ng-click which triggers function start in another controller.
Any suggestion or advice would be appreciated.
Thank you.