<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
</style>
</head>
<body>
<script src="./lib/vue.js"></script>
<div id='app'></div>
<script type="text/javascript">
new Vue({
el:'#app',
data:{
msg:'指令系统'
},
template:'<div class="app>{{msg}}</div>'
});
</script>
</body>
</html>
以上代码中,template这一小块是不报错的,但是我只要一换行
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
</style>
</head>
<body>
<script src="./lib/vue.js"></script>
<div id='app'></div>
<script type="text/javascript">
new Vue({
el:'#app',
data:{
msg:'指令系统'
},
template:'
<div class="app>{{msg}}</div>
'
});
</script>
</body>
</html>
这样vscode就给我报错,我在百度上也找不到解决方法,有没有大佬给说一下,谢谢。
用
`
代替'