Required to click on tab twice to get class='active'
Closed this issue · 7 comments
First go around, used this directive, and it appears to be changing the URL when clicking each tab. Unfrotunately the active tab state isn't working. URL Changes after first click, tab becomes active class after second click.
Any ideas?
Is it happening in the example? If not can you share your code?
Did you figure this out? If so please post an example of your code, otherwise i'll close this issue in 3 days.
I did figure it out. there was a typo which I found only after 4 reviews hah. Sorry for the delay and thanks for following up.
No worries, happy to help.
Hi
I have same problem, but cannot found any typos
vm.tabs = [
{
heading: 'accountancy',
route: 'accountancy'
},
{
heading: 'accountancy.invoices',
route: 'accountancy.invoices'
}
];
<tabs data="ctrl.tabs" type="tabs"/>
<div class="tab-content">
<div class="tab-pane active">
<div ui-view="main"></div>
<div class="clearfix"></div>
</div>
</div>
also if i come to state directly, then tab will have correct class
You can't self-close the tabs tag like that, that's the problem. Close it explicitly.
I try both options, and - works same.
fiexd after I set sub-route to both tabs routes.