Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70433

Setting IonicModule navAnimation per component

$
0
0

@kks21199 wrote:

I have a page transition animation working using ionic 5. Currently this is how I set the animation,

@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [BrowserModule,
    IonicModule.forRoot({
      navAnimation: customAnimation
    }),
    AppRoutingModule],
  providers: [
    StatusBar,
    SplashScreen,
    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

The problem witht his methid is that all pages are animated the same. How can I set navAnimation per component basis?

I tried adding this to one of my page modules,

NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    LoginPageRoutingModule,
    IonicModule.forRoot({
      navAnimation: customAnimation
    }),
  ],
  declarations: [LoginPage]
})
export class LoginPageModule {}

But this doesnt do anything at all.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70433

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>