Tabbar setActiveTab() and double 'init' event
Please help me with tabbar setActiveTab() method. I see folowing problems:
If I have
setActiveTab()method doesn’t work during page initialization. If I use
showevents - fist tab is active always (as I understand because first tab have
activeattribute). How I can change active tab before page displaying? Maybe if active tab option specified directly during initialization with
setActiveTab()method you should ignore
activeattribute? I need
activeattribute because mostly time page displayed with first active tab by default and only sometime I need to open page with other active tab.
If I remove
activeattribute from the first
ons-taband for each
initevent I use
setActiveTab()(with tab index if specified or with first tab otherwise) - I see ‘init’ event twice for the first tab. Unfortunately these double
@Fran-Diox Thanks for example.
Yes I see that your example work as expected. Second tab activated even I added
activeattribute to the first tab. And no double
initif I use
But my project more complex and I will try to play with more complex Pen.
Also is it possible because I use 2.0.3 version? I asked question regarding upgrade in this topic.