06-Vue报错Failed to execute 'setAttribute' on 'Element': '{{count}}' is not a

Posted romantic-blood

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了06-Vue报错Failed to execute 'setAttribute' on 'Element': '{{count}}' is not a相关的知识,希望对你有一定的参考价值。

找了半天错误最后发现count放到了div里面
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="vue.js"></script>
</head>
<body>
<div id="app">
<my-component :init-count="1"></my-component>
</div>
<script>
Vue.component("my-component",
props:["initCount"],
template:`<divcount></div>`,
data()
return
count:this.initCount


);
new Vue(
el:"#app",
)
</script>
</body>
</html>

以上是关于06-Vue报错Failed to execute 'setAttribute' on 'Element': '{{count}}' is not a的主要内容,如果未能解决你的问题,请参考以下文章

IDEA报错Failed to execute goal

Spring boot打包报错:Failed to execute goal org.apache.

vue 项目报错:Error in nextTick: "InvalidCharacterError: Failed to execute 'setAttribute' on

maven报错---Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin

fetch 报错 Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot

fetch 报错 Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot