Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

Does Ionic Vue support router props

$
0
0

I want to pass data between components, and the regular vue router supports passing props to route components.

Now, this is simply a convenience from just taking the params off the route, but it is nice and clean to just put them on the props. So in theory I should be able to do:

{
  path: '/results/history/:id',
  name: 'ResultHistory',
  component: ResultHistory,
  props: true
},

In my routes, and then just do:

props: {
  id: number
}

in my ResultHistory component, and the vue router would automatically put the value in the prop, so if I visited /results/history/7, i could simply access props.id and the number 7 would be there. Yet, this doesn’t seem to work for me in Ionic.

I can of course still get the params off the route directly, but is there a way to make props work?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



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