Reputation: 55
If there is a hello.vue and I want to use it in index.html but there is not vue-cli and nodejs.
I do know how to use vue.js but do not know how to use the vue'scomponent if I have a hello.vue.
Do not I say it clearly? please do not tell me how to thank you.
how to use it?
Upvotes: 1
Views: 71
Reputation: 1915
Yes. You just need to import Vue from CDN.
For production:
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
For development: (gives you full warnings and debug mode)
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
Then you can just add a script
tag and create a Vue instance.
window.app = new Vue({
el: "#app"
})
For more information visit the official documentation.
Upvotes: 2