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

vue-simple-alert does not work in Nuxt.js #40

Open
Aravinda93 opened this issue Sep 26, 2022 · 0 comments
Open

vue-simple-alert does not work in Nuxt.js #40

Aravinda93 opened this issue Sep 26, 2022 · 0 comments

Comments

@Aravinda93
Copy link

I am trying to add the vue-simple-alert package to my Nuxt.js application but it's not working at all. I have followed below steps:

  1. Install and add the package to my package.json via command npm install vue-simple-alert --save.
  2. Add a file alert.js under the folder plugins within my nuxt.js project and add following code:
import Vue from 'vue'
import alertifyjs from 'alertifyjs'

Vue.use(alertifyjs)
  1. Add the following lines within nuxt.config.js:
plugins: [
    { src: "~/plugins/alert", ssr: false }
  ],

Then within my pages/text.vue I added the alert message as per documentation:

this.$alert("Hello Vue Simple Alert.");

The message is displayed as a paragraph text on the Vue page rather than alert message.

enter image description here

I am not understanding whats wrong because I have used other packages similarly and everything worked well with them but same approach does not work for vue-simple-alert.

Reference documentation: https://www.npmjs.com/package/vue-simple-alert

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