I used jQuery many times I am new to angular js.
I called a function on click event of a link. When i click on link it work fine and code is as below
<div data-ng-controller="myCtrl" >
<a id="clickBtn" data-ng-click="clickDetails()" ></a>
</div>
But when i trigger the click event programmatically on page load. This function not called "clickDetails". I am triggering click event using this code:
$(document).ready(function () {
$('#clickBtn').trigger('click');
});
Any hint or suggestion will be appreciated.
Thanks in advance
clickDetailsinmyCtrl, since controller is created at each view, you will be sure thatclickDetailswill be called for each view request.