No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    [Solved] How does the new 'Notify' component work in v0.15?

    Help
    1
    3
    2886
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A3an
      A3an last edited by A3an

      Hi, does anyone know how the new Notify component works? I have tried several approaches, but none work for me.
      I have tried the following (following some comments in Gitter on 2 Dec)

      Notify('My Error Message')  // -> TypeError: Object(...) is not a function
      Notify({ message: 'My Error Message' }) // -> TypeError: Object(...) is not a function
      this.$q.notify('My Error Message') // -> TypeError: this.$q.notify is not a function
      Notify.create('My Message') // -> TypeError: cannot read property 'add' of undefined
      

      Please help!

      1 Reply Last reply Reply Quote 1
      • A3an
        A3an last edited by A3an

        I also notice in the source for src/plugins/notify.js, the create function is as follows:

        var notify = {
          create: function create (opts) {
            return this.__vm.add(opts)
          },
        

        but there is another install ({ $q, Vue }) function included below that as well, which implies that the component needs to be installed.

        I have also tried adding a `<q-notification></q-notification> to my template as well.

        Can anyone comment on this?

        1 Reply Last reply Reply Quote 0
        • A3an
          A3an last edited by

          @rstoenescu solved this for me!

          If you are using the v0.15 starter kit ( https://github.com/quasarframework/quasar-starter-kit ), then do it like this:

          -> “add it in quasar.conf > framework > plugins: [ ‘Notify’, …]”

          If you are not using the starter kit, then:

          -> “Then in main.js, import { Notify } from ‘quasar’… then look for Vue.use(Quasar, {plugins: {Notify, …”

          Just putting it out there 🙂

          1 Reply Last reply Reply Quote 1
          • First post
            Last post