[英]Vue.js simple script don't work
I'm trying to run the code bellow, which is probably the most simple example of Vue.js, but it doesn't work at all: 我正在尝试运行下面的代码,这可能是Vue.js的最简单示例,但它根本不起作用:
<div id="app">
{{ message }}
</div>
<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!'
}
})
</script>
What's the problem? 有什么问题? I'm loading
<script src="https://unpkg.com/vue@2.1.10/dist/vue.js"></script>
in the header, no errors or warnings in Chrome dev tools. 我正在标题中加载
<script src="https://unpkg.com/vue@2.1.10/dist/vue.js"></script>
,Chrome开发工具中没有错误或警告。 Thanks for any tips. 感谢您的提示。
Well, turned out, that Vue.js and Flask are using the same syntax for templates (two handelbars {{}}
). 好吧,事实证明,Vue.js和Flask对模板使用了相同的语法(两个手把
{{}}
)。 So if you're using both of them - check this out https://github.com/yymm/flask-vuejs 因此,如果您同时使用它们-请查看https://github.com/yymm/flask-vuejs
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.