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

Tabs are broken inside an ng-repeat in v0.5.0 but work in 0.4.0 #895

Closed
SmithSamuelM opened this issue Aug 26, 2013 · 1 comment
Closed

Comments

@SmithSamuelM
Copy link

Bug 0.5.0 tabs breaks inside an ng-repeat
Here are plunkers showing difference
0.4
http://plnkr.co/edit/87ggrnntLkfYunnk9Snn?p=preview
0.5
http://plnkr.co/edit/xUSbkGxxR3jcLphQz4A8?p=preview

Associated Error from real code

TypeError: Cannot read property '$parent' of undefined
at link (http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.5.0.js:2677:51)
at nodeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:5088:13)
at delayedNodeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:5256:11)
at compositeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:4607:15)
at nodeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:5082:24)
at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:5257:13
at nodeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:5082:24)
at delayedNodeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:5256:11)
at compositeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:4595:15)
at compositeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.js:4610:13)

    tabset-titles="!tabsAbove">

    .directive('tabsetTitles', function($http) {
    return {
    restrict: 'A',
    require: '^tabset',
    templateUrl: 'template/tabs/tabset-titles.html',
    replace: true,
    link: 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
    tabsetCtrl.$transcludeFn(tabsetCtrl.$scope.$parent, function(node) {
    elm.append(node);
    });
    }
    }
    };
    })

    ;

@bekos
Copy link
Contributor

bekos commented Aug 26, 2013

Duplicate of #783.

@bekos bekos closed this as completed Aug 26, 2013
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

2 participants