I introduced vue.js directly into the browser.
the following code. Click hi to print only hi but not hello. I don"t know why.
< div id= "app" >
< div Vlyon app Hello = "hello" >
<div v-on:click="hi">hi</div>
< / div >
< / div >
< script >
var vm = new Vue ({
el:"-sharpapp",
methods: {
hello: function() {
console.log("hello");
},
hi: function(){
console.log("hi");
this.$emit("hello");
}
}
});
< / script >