-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Undefined $scope in tabsetTitles Directive #790
Comments
@chrismatheson could you please provide a minimal reproduce scenario using http://plnkr.co/ ? We've got a similar bug report here: #776 but I would like to confirm if this is a duplicate or not. |
It sounds like a duplicate, but im not sure i can reproduce yet. This is quite deeply embedded into my angular app, and a very similar template does not throw the same error. |
im definately not using ng-if but i am using ng-show & ng-view |
I seem to be having a similar when using nested tabs. |
@alexhocksween yes, I also found the same error in nested tabs |
@Veabers you patch not fix the problem, but create a new bug in my app which has nested tabs. |
To simple fix it, I add a new if check at following line 4, but I dont know why need it when write nested tabs link: function(scope, elm, attrs, tabsetCtrl) {
if (!scope.$eval(attrs.tabsetTitles)) {
elm.remove();
} else if (tabsetCtrl.$scope) {
//now that tabs location has been decided, transclude the tab titles in
tabsetCtrl.$transcludeFn(tabsetCtrl.$scope.$parent, function(node) {
elm.append(node);
});
}
} |
sorry about the noise. |
I'll take a look at this tomorrow |
You are right. The reason that this fix work for me is that I have the templates inline locally. That might explain why the error occurs on nested tabs, because the template is already in the cache and resolving the promise on the initial request causes the tab link function to occur after the tabset link function. I'm not sure how to fix when using templateURL, but maybe my observations will help. |
I think they are fixing the templateUrl nested directives in 1.2. I never had time to look at this, is the problem simply nested-templateUrl-directive bug? |
I found another issue with the 1.2. Seems related to this one. |
Duplicate of #783 |
Im really not sure what i can do to help here but im getting the following error
At the debugger, i get tabsetCtrl.$scope undefined. Not sure what i should be looking for here to give more info.
The text was updated successfully, but these errors were encountered: