Force the same visual style for all platforms in Ionic

/ September 10, 2017/ Ionic

Ionic uses different visual styles for different elements like icons for each platform (for example in iOS the navbar title is centered while in Android it goes at the left), the idea is to get a much “native” feeling in each platform but sometimes you could need (or required to) use the same visual style for all platforms, for example when you have to build your app for browser.

Ad:
There is a way to define a global style in a cross platform way passing the modeconfig to the second parameter of your IonicModule.

app.module.ts

imports: [
        IonicModule.forRoot(MyApp,
            {
                mode: 'ios', //md: android , wp: for windows 
            }),
    ],

 

Spread the love

Leave a Reply

Be the First to Comment!

Notify of
avatar