Im trying to start my app with a sample url like this one : https://www.example.com/?foo=bar
I tried the following in my Vue Router as explained here (https://router.vuejs.org/guide/essentials/passing-props.html#function-mode) :
function dynamicPropsFn (route) {
console.log(route.query.foo) // undefined ??
return {
foo: route.query.foo
}
}
//...
{
path: "/",
name: "landing",
meta : {layout : 'landing'},
component : Landing,
props: dynamicPropsFn
},//...
My issue is that the query string parameter is always undefined ...
Any help would be appreciated!