bug: Vue: ion-router-outlet not passing Route Props

Bug Report

Ionic version:
[x] 5.x (Vue)

Current behavior:
When I setup Vue routes with props, the ion-router-outlet they not get passed to the Vue Component.

Expected behavior:
The Router props should be passed through ion-router-outlet to the Vue Component.

Steps to reproduce:

  1. Create a route with props, example:
    { path: '/auth/login', component: () => import ('../views/LoginRegister.vue'), props: { action: 'Sign In' }, },

  2. use <ion-router-outlet>

  3. Try to access the route props in the component:
    setup(props){ console.log(props.action)

Other information:
I switched it to <vue-router>, and the props got passed.

Another user pointed that <ion-router-outlet> is not actually wrapping <vue-router>. It is actually a custom ionic implementation.
Still, it is important that it can forward props, and any other information that is in the <vue-router> api.

Author: Fantashit

2 thoughts on “bug: Vue: ion-router-outlet not passing Route Props

Comments are closed.