I'm using angular material (https://material.angularjs.org/)
Is there a way to separate a tabs body from the tab list? I couldn't find any mention of this in the documentation.
Currently I have something like this, I need to move md-tab-body outside of md-tabs. Preferably without use of states or controller show/hide logic.
<md-tabs>
<md-tab>
<md-tab-label>First tab</md-tab-label>
<md-tab-body>
<p>First tabs content.</p>
</md-tab-body>
</md-tab>
<md-tab>
<md-tab-label>Second tab</md-tab-label>
<md-tab-body>
<p>Second tabs content.</p>
</md-tab-body>
</md-tab>
This isn't currently possible, but there may be different solutions depending on your use-case.
The md-tab-body is optional, so you can use md-tabs to only handle the tab bar, and manually handle your tab content elsewhere, bound to the same selected index used by md-tabs.
A lot of people want this functionality so that the tab bar can be a part of md-toolbar. This can be achieved by putting the md-tabs element directly after the md-toolbar, as demonstrated here: http://codepen.io/robertmesserle/pen/LVxzNW
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With