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

    Access Global Event Bus Outside Vue Files (v.0.15.1)

    Help
    5
    10
    2146
    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.
    • S
      snowdrop last edited by snowdrop

      Is there any way to access global event bus outside Vue files on v0.15.1? The documentation only says on how to use it inside of Vue files but not outside. Thanks

      1 Reply Last reply Reply Quote 1
      • N
        Nicholas last edited by

        Had this problem too.
        I created my own global event bus using this tutorial:

        https://alligator.io/vuejs/global-event-bus/

        1 Reply Last reply Reply Quote 0
        • S
          snowdrop last edited by

          @Nicholas that’s also what I’m going to do if there is no way for now. Seems not possible I think. Would be great if there is a workaround. 🙂

          1 Reply Last reply Reply Quote 0
          • J
            jeffatpf last edited by

            It would be nice to get the Events component back in 0.15.1.

            1 Reply Last reply Reply Quote 0
            • S
              snowdrop last edited by

              Yeah. I have resorted on creating my own Event Bus for the mean time.

              1 Reply Last reply Reply Quote 0
              • M
                MusicForMellons last edited by

                Same here.

                1 Reply Last reply Reply Quote 0
                • M
                  MusicForMellons last edited by

                  This might be of interest as well:
                  http://vuetips.com/global-event-bus

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

                    This really depends where you are accessing the event bus. For example in a Vuex store you can pass the vue instance to the store when dispatching an action

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      MusicForMellons @benoitranque last edited by

                      @benoitranque Sounds good, could you maybe give some code example of this?

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

                        Never mind. You can access the vue instance with this._vm inside the store. So this._vm.$emit should work

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