We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
// plugins/noty.js import Vue from 'vue' import 'vuejs-noty/dist/vuejs-noty.css' const VueNoty = require('vuejs-noty') Vue.use(VueNoty, { timeout: 3000, progressBar: true, layout: 'topRight' })
// nuxt.config.js // If set ssr to true, it will the throw error 'document is not defined' plugins: [ { src: '@/plugins/noty.js', ssr: false }, ]
<script> // index.vue export default { mounted () { console.log(this.$noty) } } </script>
$noty is undefined $noty doesn't seem to be added to the Vue prototype, what should I do?
The text was updated successfully, but these errors were encountered:
The same question but I want use it in plugin (for axios interceptors).
Sorry, something went wrong.
Same question, haven't been able to get it to work. If I do, I'll post how.
late but maybe it helps someone else
// plugins/noty.js import 'vuejs-noty/dist/vuejs-noty.css' import Vue from 'vue' import VueNoty from 'vuejs-noty' export default ({app}, inject) => { inject('noty', Vue.use(VueNoty, { timeout: 3000, progressBar: false, layout: 'topRight', closeWith: ['click', 'button'], }).noty) }
No branches or pull requests
$noty is undefined
$noty doesn't seem to be added to the Vue prototype, what should I do?
The text was updated successfully, but these errors were encountered: