This repository has been archived by the owner on May 29, 2019. It is now read-only.
Tab select method fired during scope destruction if used in Modal Directive #3366
Labels
Milestone
I used Tabs in Modal ..when modal close or dismiss, then trigger the tabselected, here is the plunkr:
http://plnkr.co/edit/0pcQYD5ESgQC0COYsObZ?p=preview
The problem is still remaining and did not fix as you discussed in:
#2155
But i made a solution for me to solve the problem:
1- I added this function in TabsetController:
var destroyed = false;
ctrl.destroyTab = function destroyTab(tab) {
console.info("ctrl.destroyTab = function destroyTab(tab) {");
destroyed = true;
ctrl.removeTab(tab);
};
2-I calling destroyTab() rather than removeTab() in $on('$destroy') in tab directive:
scope.$on('$destroy', function() {
tabsetCtrl.destroyTab(scope);
});
here is the plunker of the solution:
http://plnkr.co/edit/weXJbOWP5okQuqd3EVRS?p=preview
see the ui-bootstrap-tpls-0.12.1-updated.js file in the plunker
please see if this solution is proper for the directive or not.
The text was updated successfully, but these errors were encountered: