rpocklin / ui-router-tabs

Idiot-proof tab panes with route support using Angular.js + Bootstrap 3 + UI Router
Other
244 stars 57 forks source link

Can't access the options defined in tabData in either controller or ui router #57

Closed tuxysuse closed 8 years ago

tuxysuse commented 8 years ago

First of all thank you for creating UI Router tabs library. It is very helpful and I am using for a sample project while learning Angular JS. I am trying to use the options parameter in tabData as mentioned in the Readme.md like below: { heading: 'Accounts', route: 'user.accounts', params: { accountId: account.id }, options: {} } I am passing custom data in this options parameter and same I want to use in the respective controller. But I am not successful to access the parameters either in the ui router or controller. I am able to access the params in router and passing it to the controller using resolve parameter. I followed the same resolve parameter in ui router for the options parameter also, but with no luck. I would like to inject into the data parameter of ui router so that I can access with $state.current.data.myVariable (or) is there any way to access in the controller with selected tab options.

rpocklin commented 8 years ago

If you could provide a plunkr I can play with that will help? If you can give an explicit example of how you want to use the options or params that may help as well.

rpocklin commented 8 years ago

Will close soon if no response.