Fredric Dael
Fredric Dael

Reputation: 61

Can someone explain to me how this code works in vue

mounted(){

this.$root.$on('dataLoaded', (magazineData) => {
    this.LoadData(magazineData);
});

}

From what I've understand it calls when dataLoaded is changed on the parent element and the magazineData is a variable inside the parent is that correct?

Upvotes: 1

Views: 34

Answers (1)

magazineData is a parameter emitted when @dataLoaded. It depends of what kind of page you're loading.

Upvotes: 1

Related Questions