It seems that when I try to emit an event in mounted it doesn't get triggered! therefore It doesnt show up in devtools
main.js
const app = new Vue({
el: '#app',
mounted() {
console.log('asd');
this.$emit("clicked", "someValue");
}
});
--
<body>
<div id="app">
<h1>vuejs</h1>
</div>
<script src="https://unpkg.com/vue@2.5.16/dist/vue.js"></script>
<script src="main.js"></script>
</body>
Why is that? and how can I do it?