Skip to content

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

Open
@Aravinda93

Description

@Aravinda93

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions