What's the difference between ion-nav and ion-router?

when to use ion-nav and when to use ion-router?
as navcontroller.push() is deprecated in ionic5 should we use ion-nav instead of it to navigate with in app?

  • IonNav: An in-memory navigation controller. Doesn’t not effect the URL
  • IonRouter: A vanilla URL router that is meant for apps not using a Framework
  • IonRouterOutlet: The Framework-specific router that integrates with Vue, React, and Angular.

If you’re building an app with react or angular, use ion-router-outlet.

1 Like