Unable to get the context in vue component framework7-vue v2

I am passing the context from the router but unable to get its value in vue page. I am getting an error
[Vue warn]: Property or method “message” is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

        resolve(
          {
            component: require('./assets/vue/pages/ContextDemo.vue'),
          },
          {
            context: {
              user: user,
            }
          }

but I am unable to get it in ContextDemo.vue

<div>{{message}}</div>

please help.

In Vue component context will be available in this.$f7route.context

And make sure you are on latest v2.0.10

Thank you so much for your reply. but when I am trying

console.log(this.$f7route.context)

it’s giving me undefined…
Yesterday I had updated to latest 2.0.10 both (f7 and f7-vue) by making changes in package.json

Yes, find the issue. Doesn’t work with async route. Already pushed fix for it, so will be in next update. As a workaround you may just set some $root data and request it on required page

1 Like

Thank you so very much, Sir.