I would like to write a getter to return this.$nuxt.$loading
from a vuex store file.
(https://nuxtjs.org/api/configuration-loading/)
This question is linked to my other question: Nuxt/Vue: How to position custom loading component
And now I thought of listening to this loading property to display my Loading component within the page.
The Loading property looks like this:
So I would like to return this.$nuxt.$loading.data.$route.show
from the vuex store. If it is true, I want to show my custom loader and if its false not – of course.
To do that I would like to access this.$nuxt
but this is undefined in my vuex store. It is only present in my components...
I tried $nuxt
– same result.
I don't know if this is right or at least one way to achieve what I want, and I am definitely open for suggestions.
Thanks in advance. Cheers