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

Fix the tabs modal to accept nested tabset #1010

Closed
wants to merge 2 commits into from
Closed

Fix the tabs modal to accept nested tabset #1010

wants to merge 2 commits into from

Conversation

MortadaAK
Copy link

In this fix the valiable ctrl of TabsetCtrl has been changed to the
scope level to choose which tab to select from.

In tabsetTitles directive, we need to let the parent tabset rendered
before the nested one.

In the template, tabsAbove needs to be set or it will always will be
down.

In this fix the valiable ctrl of TabsetCtrl has been changed to the
scope level to choose which tab to select from.

In tabsetTitles directive, we need to let the parent tabset rendered
before the nested one.

In the template, tabsAbove needs to be set or it will always will be
down.
change bar to progress-bar
@caitp
Copy link
Contributor

caitp commented Sep 15, 2013

plnkr demo

LGTM, does this have an affect on tabsets nested within tabsets? It would be awesome if this solves that


Oh would you look at that, nested tabsets working there, that's neat. (But these aren't relying on templateUrl, so it's kind of all being compiled at the same time, which would account for that)

@ajoslin
Copy link
Contributor

ajoslin commented Sep 23, 2013

Hi @MortadaAK - thanks. It looks like it could work - but it also looks like tabsetTitles is getting ugly and begging for a refactor. Could you add a bunch of unit tests for this that we could consider refactoring against?

@ajoslin
Copy link
Contributor

ajoslin commented Sep 23, 2013

Also, angularjs team is fixing the templateUrl directive bug for 1.2 release angular/angular.js#3927

@pkozlowski-opensource
Copy link
Member

@ajoslin @MortadaAK I don't think we should merge this one. While it could work we don't have any tests that would prove it. Moreover using $timeout to "solve" lifecycle issues is seldom a good idea. I had a quick look at the underlying issue and it looks like <tabset> linking function is not called for the nested tabs (inner one). Or more accurately - it is not called before tabsetTitles linking function. So either we misunderstand directives lifecycle or there is a bug in AngularJS. In any case a change suggested here is not a proper solution.

Closing this one for now, @ajoslin I've got a minimal unit test demonstrating the issue, will comment more in the original ticket.

@ajoslin
Copy link
Contributor

ajoslin commented Sep 30, 2013

I think we can fix the nested bug better using official angularJS fix for nested templateurl directives, which is coming soon. 


Sent from Mailbox for iPhone

On Sun, Sep 29, 2013 at 1:11 PM, Pawel Kozlowski notifications@github.com
wrote:

@ajoslin @MortadaAK I don't think we should merge this one. While it could work we don't have any tests that would prove it. Moreover using $timeout to "solve" lifecycle issues is seldom a good idea. I had a quick look at the underlying issue and it looks like <tabset> linking function is not called for the nested tabs (inner one). Or more accurately - it is not called before tabsetTitles linking function. So either we misunderstand directives lifecycle or there is a bug in AngularJS. In any case a change suggested here is not a proper solution.

Closing this one for now, @ajoslin I've got a minimal unit test demonstrating the issue, will comment more in the original ticket.

Reply to this email directly or view it on GitHub:
#1010 (comment)

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

Successfully merging this pull request may close these issues.

4 participants