mgcrea / angular-strap

AngularJS 1.2+ native directives for Bootstrap 3.
mgcrea.github.io/angular-strap
MIT License
5.73k stars 1.38k forks source link

bs-modal OnHide not firing #2232

Closed robpolak closed 5 years ago

robpolak commented 7 years ago

Per the documentation the bs-modal should fire an event on hide.. this seems to be broken:

Plunkr: http://plnkr.co/edit/ExK84TXrQxxBKEPO1MYz

madflow commented 7 years ago

It works when you open the aside component differently:

https://plnkr.co/edit/Fqpk4H2pjyBk7UX30OoQ?p=preview

ViieeS commented 7 years ago

Works for 2.3.8 via bs-on-show / bs-on-hide: example.

Anyway, it doesn't work for me in version 2.3.12...

ViieeS commented 7 years ago

I found out what was wrong! I have defined cb function in directive on postLink state. After I defined cb on preLink state it became to work!

ViieeS commented 7 years ago
link: {
  pre: function (scope) {
    scope.isActive = false;
    scope.toggleActive = function () {
      scope.isActive = !scope.isActive;
    };
}
<button bs-dropdown data-bs-on-hide="toggleActive" data-bs-on-show="toggleActive">
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.