Use Material Design component on iOS

Hi,

I am trying to use segments with the MD style on every platform. Is there any easy way to make this?

I achieve this by changing the node_module/ionic-angular/component.ios.scss
from “components/segment/segment.ios” to “components/segment/segment.md” but if I delete and rebuild the node-modules I have to repeat this. Is there any better solution to this?

Thanks

You can set ‘mode’ in ionicBootstrap.
regards.

in app.ts.

ionicBootstrap(MyApp,,{
mode: ‘md’,
});

1 Like

Thanks!
But this would change every component and most of the components I need are from iOS.
For now, I only need MD segments.

From the Changelog for 2.0.0-rc.0 (https://github.com/driftyco/ionic/blob/master/CHANGELOG.md)

Components can now individually set a mode, which means an app can mix and match iOS / Material Design / Windows Platform modes if that’s desired

I cannot find any info on this in the docs (Platform Specific Styles). But <ion-segment class="md"> is not working for me. Anybody got this to work yet?

2 Likes

Hey… didnyou find a way ro get this working?

mode="ios" worked for me of the element itslef

<ion-radio mode="ios" > Radio </ion-radio>

4 Likes