135
rated 0 times
[
137]
[
2]
/ answers: 1 / hits: 16536
/ 11 Years ago, tue, october 29, 2013, 12:00:00
I am using bootstrap-angular-ui-modal for a site I am working on. The code I am using to open the modal
$modal.open(
{
templateUrl: '/home/template',
controller: myCtrl,
resolve: {
data: function () {
return data;
}
}
});
Everything is working fine. But I need to find a way to execute some code after modal is loaded. I tried different things but can't make them work. Some of things I tried
In template I did
<script>
document.onload = function () {
console.log('opened');
};
</script>
I also found there is a promise for the angular modal object named openned. I tried to
modalInstance.opened.then(function(){console.log('hello')});
not working either. I can use some help here.
More From » angularjs