0👍
Vue and Jquery not using the same way or idea to creating dynamics element. Jquery using selectors for access the elements, Vue uses templates for making real dynamic elements.
What you are searching for is a vue templating. When the template saved into a file you have to import it to your component, and put into components
. Check this vue structure
import Hello form ./folder/another/Hello.vue
...
componets:{
Hello
}
Also solution when you write small component in script
tags. Check it on this example
Example
<template id="create-template">
....
</template>
Vue.component('create-post', {
template: '#create-template'
})
- [Vuejs]-What's the best way to go about calculating data with multiple facets?
- [Vuejs]-Front end not shaping in laravel 6.2
Source:stackexchange.com