如果 div下面存在模板,Vue里面也有模板的话,在执行的时候,vue会自动忽略div下面的吗? <h1>hello</h1>中的hello不会在页面输出?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>vue入门</title>
<script src="vue.js"></script>
</head>
<body>
<div id="root">
<h1>hello</h1>
</div>
<script>
new Vue({
el:"#root",//挂载点
template:'<h2>bee2{{msg}}</h2>',
data:{
msg:"Hello World bee"
}
})
</script>
</body>
</html>