简体   繁体   中英

How to trigger ng-click event

<a role="button" id="trigger" class="qui-button" ng-click="ctrl.openDialog(); ctrl.triggerClick();">Confirm Dialog</a>

I want to trigger this by pressing another button, i was using jquery to trigger the click event by:

function myFunction() {
  document.getElementById("trigger").click()
}

I trigger the click event, but ng-click event did not work.

How could i fix this problem?

为什么不让另一个按钮的ng-click等于同一功能呢?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM