Reputation: 36247
I'm using netbeans as an editor and trying to work my way through the laracast vue videos including https://laracasts.com/series/learning-vue-step-by-step/episodes/1
<script> src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.12/vue.js"</script>
<div id="app">
<h1>
{{message}}
</h1>
</div>
var data = {message: "hi there"}
new Vue({
el: '#app',
data: data
});
when I check chrome dev tools I see:
Uncaught ReferenceError: Vue is not defined
Am I doing something wrong with the CDN?
Upvotes: 0
Views: 12076
Reputation: 793
Please note that while using Vue with laravel blade files. You had to save those Vue code in a separate file with vue extension and then add them in blade files. as indicate here. Otherwise I believe both will try to interpret double mustache and to cater that you had to rewrite a lot of either lib.
Upvotes: 0
Reputation: 15382
src
is attribute of script
tag, so:
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.12/vue.js"></script>
Upvotes: 7