Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic 2 set single component to md

Is it possible to set a single component in a page to a certain platform.

For example, I have an iOS screen and I want the bottom toolbar just for this one page to use the Android Style (material design).

like image 299
TheAppchemist Avatar asked Oct 18 '22 09:10

TheAppchemist


1 Answers

Yes, this is possible every component in Ionic can be configured on 3 levels Global, Platform and Component level. To make that particular Toolbar component use Android Material Design Style no matter what platform it is, you can use the "mode" attribute and set it to md.

<ion-toolbar mode="md">
  <ion-title>Scrolls with the content</ion-title>
</ion-toolbar>

You can also configure to Windows with wp and IOS with ios values for the mode attribute. See http://ionicframework.com/docs/v2/api/components/toolbar/Toolbar/ for more details.

like image 171
Sani Yusuf Avatar answered Oct 21 '22 04:10

Sani Yusuf