Reputation: 717
I am new to Vue.js and I am looking at someone's code. I noticed they are using the @ symbol. What does this do and what is it used for?
export default {
methods: {
handleCreate() {
console.log('Child has been created.');
}
}
};
<template>
<ChildComponent @created="handleCreate" />
</template>
// ChildComponent
export default {
created() {
this.$emit('created');
}
}
Upvotes: 23
Views: 16633