index
- Angular
- React
- Vue
note
Since the config is set at runtime, you will not have access to the Platform Dependency Injection. Instead, you can use the underlying functions that the provider uses directly.
See the Angular Platform Documentation for the types of platforms you can detect.
app.module.ts
import { isPlatform, IonicModule } from '@ionic/angular';
@NgModule({
...
imports: [
IonicModule.forRoot({
animated: !isPlatform('mobileweb')
})
],
...
})
note
See the React Platform Documentation for the types of platforms you can detect.
App.tsx
import { isPlatform, setupIonicReact } from '@ionic/react';
setupIonicReact({
animated: !isPlatform('mobileweb'),
});
note
See the Vue Platform Documentation for the types of platforms you can detect.
main.ts
import { IonicVue, isPlatform } from '@ionic/vue';
createApp(App).use(IonicVue, {
animated: !isPlatform('mobileweb'),
});