[Vuejs]-Trying to capture events on vue.js 2, but without success

-1👍

Try using nextTick:

`mounted() { 
    this.$nextTick(function () {
        this.$bus.$on('get-level-items', (obj) => {
            if (obj.level === 'third' && obj.parent === this.parent) {
                if (this.itemsNotFilled) {
                    this.getAllCategories(this.parent)
                }
            }
         })
      })
  }`

Leave a comment