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

    two event bus not working

    Help
    1
    1
    63
    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.
    • L
      lakminayo last edited by lakminayo

      I have the following two eventbus from two different components but when I listen to those two events, only the event bus on the parent component will receive the data and the event on the other component will not receive the data. Hope everybody help please

      mounted () {
              this.$root.$on('busData', data => {
                  this.itemHotels = data
                  console.log(data)
              })
              this.$root.$on('test', data => {
                  this.itemHotels = data
                  console.log(this.data)
              })
          },
          beforeDestroy () {
              this.$root.$off('busData', this.itemHotels)
              this.$root.$off('test', this.itemHotels)
          }
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post