Home > OS >  How do I change the mode of all modals to ios in Ionic (Angular)?
How do I change the mode of all modals to ios in Ionic (Angular)?

Time:12-08

how can I change the mode of all my modal components in my Ionic 5 application to be shown as ios modals? For one specific modal you can simply write:

....
mode: 'ios',
....

But how/where can you change the default mode for all modals globally to ios?

Thank you!

CodePudding user response:

Change mode in config for IonicModule in app.module.ts

@NgModule({
  ...
  imports: [
    ...
    IonicModule.forRoot({
        ...
        mode: "ios",
        ... 
    }),
    ...
  ],
  ...
})
  • Related