Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Tabset directive does't support nested tabset #1002

Closed
MortadaAK opened this issue Sep 13, 2013 · 2 comments
Closed

Tabset directive does't support nested tabset #1002

MortadaAK opened this issue Sep 13, 2013 · 2 comments

Comments

@MortadaAK
Copy link

When I tried to use this as nested tabset I get this error.

TypeError: Cannot read property '$parent' of undefined

But when i tried to modify the code by setting a timeout for tabsetTitles directive in the link method I got one nested tabset but not more than one.

The new function become like this:

function (scope, elm, attrs, tabsetCtrl) {
    if (!scope.$eval(attrs.tabsetTitles)) {
        elm.remove();
    } else {
        //now that tabs location has been decided, transclude the tab titles in
        $timeout(function () {
            tabsetCtrl.$transcludeFn(tabsetCtrl.$scope.$parent, function (node) {
                elm.append(node);
            });
        });
    }
}

But using this way the tests start to fail.

So, what is the best way to implement nested tabsets.

@caitp
Copy link
Contributor

caitp commented Sep 14, 2013

Could you perhaps demonstrate the issue with a plnkr? I'm not sure I understand what you're trying to do

@bekos
Copy link
Contributor

bekos commented Sep 14, 2013

@MortadaAK Thx for the report but this is a duplicate of #783. It is a know bug since 0.5.
If you are willing to investigate this further and submit a PR with a solution, would be awesome.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants