Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

ons-tabbar in V2 loads all pages?

  • Hello,

    In V1, ons-tabbar inserted only the current tab in the DOM, but now in V2 all tabs are. Am I correct?

    I have two different but similar tabs. Sometimes I have the same ID in both tabs. My labels are linked to their input with the “for” attribute, but since both tabs are inserted in the DOM, my IDs are not unique anymore, thus when I click on my labels, nothing happens. Any suggestions beside renaming all my IDs?

    Thank you!

  • Onsen UI

    @etagrats Yes, you are right. We decided to make all the pages persistent because the previous behavior just delayed the page load after clicking on the tabbar.
    For your specific problem I’d recommend you using class instead of id so you can get all the elements. Also, we have a migration guide that might be helpful.