javascript - How to wireup an AngularStrap modal show event -


i have modal displaying fine. i'm trying figure out how run function when modal shown.

 var = loginmodal = $modal({ placement: 'left', title: '', content: webauth, show: false });   $scope.$on('modal.show', function () {         console.log("shown");         debugger;     });      $scope.showmodal = function () {          loginmodal.$promise             .then(loginmodal.show);      }; 

i expecting $scope.$on('modal.show') fire when modal shown, no luck far.

try this:

$scope.showmodal = function() {     mymodal.$promise.then(mymodal.show).then(function(){         console.info('shown');     }); }; 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -