This repository was archived by the owner on May 2, 2020. It is now read-only.
This repository was archived by the owner on May 2, 2020. It is now read-only.
[Question] How to access $route.params from the page component code? #731
Open
Description
I've confused a lot with bringing dynamic routes to work with in AF.
Creating dynamic route:
{
"path": "/track/:index/",
"component": "track.vue"
},
Creating component track.vue
:
<template>
<f7-page>
{{ $route.params.index }}
</f7-page>
</template>
<script>
export default {
props: ['index'],
created: function () {
try {
console.log("this.$route", this.$route)
} catch (err) {}
}
}
</script>
And all I'm getting is _vm.$route is undefined and this.$route is undefined. What am I downing wrong?