I have really basic Vue app (on Rails):
hello_vue.js:
import Vue from 'vue/dist/vue.esm'
import TurbolinksAdapter from 'vue-turbolinks'
Vue.use(TurbolinksAdapter)
import CollectionSet from '../collection_set.vue'
document.addEventListener('turbolinks:load', () => {
const app = new Vue({
el: '#app',
components: { CollectionSet }
})
})
collection_set.vue:
<script>
import Collectable from './collectable.vue'
export default {
components: { Collectable }
}
</script>
<template>
<p>test</p>
<collectable />
</template>
collectable.vue:
<script>
export default {
name: 'collectable'
}
</script>
<template>
<p>test 2</p>
</template>
my webpage:
<div id="app"><collection-set /></div>
With above example I don't see anything, but when I remove <collectable /> from collection_set.vue, I see test. I don't have any errors.
Why collectable is not being rendered?
collectable.vueI have:<script>export default { name: 'Collectable' }</script>, do you mean it?collectable, still nothing gets rendered.