ons-tabbar in V2 loads all pages?
etagrats last edited by
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?
@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
idso you can get all the elements. Also, we have a migration guide that might be helpful.