Strange behaviour when removing/updating tabs
As per the given examples, you can create an array of tabs within the scope and display them using an ng-repeat. However, I've found some bizarre behaviour when you try to modify the tabs in the scope:
- Adding a new tab to the tabs array works fine, adds the new tab and the new pane to display the content
- Removing a tab causes the content pane to be removed, but the tab persists in the view
- Resetting the tabs array to another set of variables adds more tabs to the view with the given content, but does not remove the old tabs, however their content is removed.
I've added a remove tab button and reset tabs button to the original example to demonstrate this behaviour in this plunker: http://plnkr.co/edit/2m2W1pjpHgK57e3ykvbh?p=preview
Perhaps I'm doing something wrong? I'd like to be able to remove individual tabs or even reset the entire array, without having to trigger a complete page refresh to render them correctly.
Having the exact same issue....! The tab is persisting in the view even after deleting and going away only if I do a page refresh.
Hi,
Another issue with tabs is the order. The tabs order is changes when using ng-include="[some template url]" in the bs-pane element. The order is not consistent nor preserving the order of the tabs array. Here is a short example:
$scope.tabs=[{template:'[url_1]', title:'tab 1'},
{template:'[url_2]', title:'tab 2'},
{template:'[url_3]', title:'tab 3'}];
html:
<div bs-pane ng-repeat="tab in tabs" data-title="tab.title" ng-include="tab.template" ></div>
Eran
@eranaorato please submit a separate issue with a test case for your problem with the tab orders. I'm closing this issue regarding add/remove of tabs as fixed in c5bc2ac.
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.