Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: initialize $scope.$tabSelected when nested tabs selected. #3223

Merged
merged 1 commit into from
Mar 11, 2015

Conversation

abruzzihraig
Copy link

Like the issue #1276 if you have some nested tabs, you select a sub-tab
item, and you will active some other siblings, because when tabCtrl add
every new $scope, it does't has a initial attr $scope.$tabSelected, so
every unselected item will read the $tabSelected from inherited $parent,
but if the parent-tab has been actived, the all of its sub-tabs
will read this true property in $scope.$tabSelected. So I think we
should initialize the property $scope.$tabSelected before invoking
tabsCtrl.add(), and every tab-item will has a 'false' status for a
initial $scope.$tabSelected.

Like the issue ionic-team#1276 if you have some nested tabs, you select a sub-tab
item, and you will active some other siblings, because when tabCtrl add
every new $scope, it does't has a initial attr $scope.$tabSelected, so
every unselected item will read the $tabSelected from inherited $parent,
but if the parent-tab has been actived, the all of its sub-tabs
will read this true property in $scope.$tabSelected. So I think we
should initialize the property $scope.$tabSelected before invoking
tabsCtrl.add(), and every tab-item will has a 'false' status for a
initial $scope.$tabSelected.
@jeremyalan
Copy link

+1

See my comment here, on the related issue:
#1276 (comment)

I came to a similar result, and this fix appears to work correctly.

adamdbradley added a commit that referenced this pull request Mar 11, 2015
fix(tab): set $scope.$tabSelected when nested tabs selected
@adamdbradley adamdbradley merged commit c18c69f into ionic-team:master Mar 11, 2015
@billymahmood
Copy link

Hi guys

Any updates on this issue?

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

Successfully merging this pull request may close these issues.

None yet

4 participants