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> ...

Get Hybrid Mobile Development with Ionic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.