Vue.createApp({
}).mount('#app')
- Interpolation
Vue.createApp({
data:()=>{
return{
msg: "hello"
}
}
}).mount('#app')
- property binding
Vue.createApp({
data:()=>{
return{
imgurl: "https://google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"",
}
}
}).mount('#app')
<img v-bind:src="imgurl" />
- event binding
Vue.createApp({
methods:{
onclick: function(){
alert("hello")
}
}
}).mount('#app')
<button v-on:click="onclick">Click me</button>
- Outputing HTML
Vue.createApp({
data:()=>{
return{
msg: "<h1>Hello</h1>"
}
}
}).mount('#app')