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

Nested Tabs: add baseParent to parent tabs #91

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

fa137
Copy link

@fa137 fa137 commented Jun 15, 2017

checks if the current state contains the base parent and sets it to active by default
for example if you have a parent state called 'test.parent', you will set up your nested tabs as following:

tabs = [
  {
    heading: 'test'
    route: 'test.parent.child1' 
    baseParent: 'test.parent'
  }
  {
    heading: 'test'
    route: 'test.cars.bmw' 
    baseParent: 'test.cars'
  }
]

childTabs = [
  {
    heading: 'first child'
    route: 'test.parent.child1' 
  }
  {
    heading: 'second child'
    route: 'test.parent.child2' 
  }
]

carTabs = [
  {
    heading: 'bmw'
    route: 'test.cars.bmw' 
  }
  {
    heading: 'mercedes benz'
    route: 'test.cars.mercedes' 
  }
]

This fixes the issue #55

fa137 and others added 4 commits June 15, 2017 16:21
checks if the current state contains the base parent and sets it to active by default
Nested Tabs: add baseParent to parent tabs
Repository owner deleted a comment from rob-pocklington-a139759 Jul 3, 2017
@rpocklin
Copy link
Owner

rpocklin commented Jul 3, 2017

Thanks for the PR. Unless i've overlooked something, $state.includes should give this functionality, and from what I can tell it works in the examples folder by highlighting Settings or Accounts as the parent route. Can you please look at that and check this functionality isn't already present?

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.

2 participants