Open ollyollyollyltd opened 8 years ago
This is a problem in the current versions, so thank for the PR.
I can't help but think, rather than making it customisable, can we just fix the actual issue? See #55.
Open to accepting but want to rule this possibility out first.
Bump. ?
Hi mate, this is still on my to-do list I am just swamped with work at the moment.
I see what you mean by #55 being a similar problem, though I'm not sure if it is 100% the same. I will look into when I get the chance.
any update on this?
If anyone wants to breathe life into this PR or has an alternative, let me know.
Sometimes $state.include is not enough for checking whether a parent tab is active, for example when the parent tab links to a default child tab.
In this case when navigating to another child tab would cause the parent to become deselected.
This commit allows a custom function to be defined in the tabs object which will be called to determine whether a tab is selected. If the function is note present the default (current) function will be used.
eg:
With this routing setup navigating to
main.users.add
will cause the 'Users' tab to lose it's active state as the $state.include will return false.With this commit we can add as
isActive
function to the tab declaration:This will allow the tab to set the state as expected.