Open a tab from controller

Hi,

I am using the starter project and the tab directive.

From the controller of the page containing the tabs, how can I open one tab ?

I tried to
1/ Inject a TabBarManager into the page controller
2/ call : TabBarManager.find(‘pocreate_resupply’).select(1);

Loading the page, I have the error :
Error: [$injector:unpr] Unknown provider: TabBarManagerProvider <- TabBarManager

Is it the right way to do ? If yes where am I doing wrong ?

Thanks,

St.

Each tab should be it’s own state, so you can just use something like $state.go('tab.adopt') to go to the adopt tab in the seed project for example.

Just remember to inject $state.

Thank you for taking the time to answer.

I did what you suggest:
0/ Create my tab :
1/ Inject the $state
2/ $state.go(‘tab.poLineDetail’)

but I have the error : Could not resolve ‘tab.poLineDetail’ from state ‘po_create’

I tried to attach the $state at the $rootScope, but it didn’t change anything.

got it work thanks to this thread : Sign-in page without tabs, then once signed-in tabs show