Answer the question
In order to leave comments, you need to log in
Nuxtjs how to call a plugin inside a plugin?
Connected the vue-notification plugin to ~plugins/vue-notification.js
import Vue from 'vue';
import VueNotifications from 'vue-notification';
Vue.use(VueNotifications);
plugins: [
{
src: '~/plugins/vue-notifications',
ssr: false
}
]
this.$notify({
group: 'alerts',
title: 'Important message',
text: 'Hello user! This is a notification!'
});
export default ({ app }, inject) => {
const displayAlert = (meta) => {
// часть кода делающая что-то важно опущена
this.$notify({
group: 'alerts',
title: 'Important message',
text: 'Hello user! This is a notification!'
});
//так же пытался app.$notify. Результат тот же
};
inject('displayAlert', displayAlert);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question