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

NPM - 2.0.2 #78

Open lilasquared opened 8 years ago

lilasquared commented 8 years ago

Hi there,

Could you publish the latest release to npm? I am still only able to download 2.0.0. Thanks!

Edit: I made the changes locally for the updates to 2.0.2 but my issue is actually still the same. I am using the ui.router with this but every state is rendering twice, once in the ui-view that I place in my template and once in the ui-view that is part of the tab template. Since I am setting up the states and configs with the $stateProvider I am not providing a templateUrl property as part of the tab. Is there a workaround for this or am I setting up the tabs wrong? Thanks in advance!

rpocklin commented 8 years ago

Keep in mind the default template changed in v2.0.0 so you may need to specify the custom template if you are embedding your own <ui-view>. Take a look at the changelog and compare the template it uses now.

I've published v2.0.2 to NPM.

lilasquared commented 8 years ago

@rpocklin I think I see. So If I want to keep the default template of the tabs, but use a custom <ui-view> then i need to specify the templateUrl as 'ui-router-tabs-custom-ui-view-template.html'?

rpocklin commented 8 years ago

Yep :)

lilasquared commented 8 years ago

Nice. The templateUrl property to me made sense if I wanted my own custom template for the tabs, not necessarily if i wanted to embed my own UI view. Would you accept a PR for a property like, custom-ui-view that would be a boolean, and if true it would pull the 'ui-router-tabs-custom-ui-view-template.html' template instead of the default one? That way it would be possible to just specify that you wanted to embed your own view, but also use the default look of the tabs as they are given?

edit: OR, a way to globally set it? I use the ui-tabs in nested states and would like them all to default to the ''ui-router-tabs-custom-ui-view-template.html' template

rpocklin commented 7 years ago

Sure, open to PRs.