Do not use ons-tabbar using the following syntax:
<ons-tabbar> <ons-tab>tab1</ons-tab> <ons-tab>tab2</ons-tab> </ons-tabbar>
Also, try implementing ons-tabbar outside of ons-page and bind a single ons-tab to a relative page (using ons-template ):
<ons-tabbar> <ons-tab page="home.html" active="true"> <ons-icon icon="ion-home"></ons-icon> <span style="font-size: 14px">Home</span> </ons-tab> <ons-tab page="fav.html" active="true"> <ons-icon icon="ion-star"></ons-icon> <span style="font-size: 14px">Favorites</span> </ons-tab> <ons-tab page="settings.html" active="true"> <ons-icon icon="ion-gear-a"></ons-icon> <span style="font-size: 14px">Settings</span> </ons-tab> </ons-tabbar> <ons-template id="home.html> <ons-page> PAGE CONTENT </ons-page> </ons-template>
Here is a sample CodePen working code based on your code:
http://codepen.io/andipavllo/pen/rxQEeY
Hope this helps!
source share