I have a code which makes an ajax call and gets a json object from which the ng-repeat's are rendered. Once this all is rendered I want to call a function which binds some events on rendered element.
<div ng-repeat="list in arr | filter: {DegreeName: 'xyz'}">
<div class="saveprogram">save program</div>
</div>
<div ng-repeat="list in arr | filter: {DegreeName: 'abc'}">
<div class="saveprogram">save program</div>
</div>
<div ng-repeat="list in arr | filter: {DegreeName: 'test'}">
<div class="saveprogram">save program</div>
</div>
Once all the above ng-repeat are rendered, I want to attach some events on it. I tried
$window.onload = function(){
//someevent
$(".saveprogram")
}
This works but it has some issues in IE. Can someone help me with some directive which runs once all the ng-repeat are rendered
Note: I have gone through many posts and tried but that didn't help. I would have used ng-click but this is an existing code and very complex. It has lot of things in it. So I don't want to rewrite everyhing again. And calling function every time on ng-click I didnt find it good. I just want to run the function once, which does all bindings