ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.89k stars 13.52k forks source link

ionic2 how to set platform #8051

Closed snopein closed 7 years ago

snopein commented 7 years ago

in ionic1 i use setPlatform('ios') to set platform so how to set platform in ionic2 /-------------------------------------------------------------------- now!!! i should know how to do app/app.ts ionicBootstrap(AppName, [], {mode: 'ios'});

sdurighello commented 6 years ago

As of now, apparently, the only way that worked for me in Ionic 2 was to use the app config as explained here: https://ionicframework.com/docs/api/config/Config/ For example, to force 'iOS' look and feel when not on a mobile platform (which defaults to 'core'):

IonicModule.forRoot(MyApp, {
    platforms: {
        core: { mode: 'ios'},
    },
})
ionitron-bot[bot] commented 6 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.