O'Reilly logo

Hybrid Mobile Development with Ionic by Gaurav Saini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tabs versus Segments

Tabs are the easiest way to switch between views and organize content at a higher level. On the other hand, a segment is a group of buttons and it can be treated as a local switch Tab inside a particular component mainly used as a filter. With Tabs we can build, quick access bar in the footer where we can place menu options such as home, favorites, and cart. This way we can have one click access to these pages or components. On the other hand, we can use segments inside the account component and divide the data displayed in three segments, profile, orders, and wallet:

// src/pages/account/account.html <ion-header>   <ion-navbar>     <button menuToggle>       <ion-icon name="menu"></ion-icon>     </button>  <ion-title>Account</ion-title> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required