Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this.$nuxt not defined #129

Open
Parakoos opened this issue Apr 23, 2021 · 0 comments
Open

this.$nuxt not defined #129

Parakoos opened this issue Apr 23, 2021 · 0 comments

Comments

@Parakoos
Copy link

Inside my dialogs, I don't seem to have access to the $nuxt helper class. So, if I have a getter like this:

get isOffline() {
	return this.$nuxt.isOffline
}

I get an error that this.$nuxt is undefined.

I open my dialog by calling

import ReorderDialog from './ReorderDialog.vue'
...
this.$dialog.show(ReorderDialog, {})

I have access to all other Nuxt-injected modules except the $nuxt helper. I have taken the advice found in this forum to move the vuetify-dialog plugin to be the last-loaded plugin. (via extendPlugins in nuxt.config.ts)

Only thing i really use the $nuxt for is to get reactive feedback on offline/online status (to turn buttons on/off) so if there is a better way of doing this that avoids using nuxt, then I could take that help too! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant