Open donv opened 10 years ago
Totally agree with donv - tabs without content are just not very useful :-( and it does not seem obvious how to actually add content. Examples currently seems hard (impossible?) to find. The technology is very promising but there is still a long way to go - and good examples will be a huge step forward.
yep.... what's the point in using tabs if you can't add content to them. was doing a bit of searching and there does not seem to be any documentation on how to add/manage content for tabs. hope there'll be some clarification on this soon.
Just for the sake of information, the way I use is the second comment in the answer to this SO question
A common way is to use core-pages along with paper-tabs. Here is a simple example: http://jsbin.com/denedudokike/1/edit
And yes we should add an example in paper-tabs repo.
Thanks @frankiefu for that!! got it working now!
@frankiefu Big thanks
Just a note: For Polymer >= 1.0 the event to listen to is 'iron-select' instead of 'core-select'
document.querySelector('paper-tabs').addEventListener('iron-select', function() { console.log(tabs.selected); });
I agree, it was more complicated than it needed to be to bind pages to tabs. The change to Polymer 1+ made it all the more frustrating.
Here's a complete (and current) example for anyone who comes along after
The example displays how to create the tab headers, but omits displaying actual tab content. Switching headers is good, but displaying content is better :)