read-more icon indicating copy to clipboard operation
read-more copied to clipboard

Failed to mount component

Open liolios opened this issue 6 years ago • 2 comments

Hi, Im getting this error when trying to use the component approach. Is there something I'm doing wrong when importing the component?

app.js:4478 [Vue warn]: Failed to mount component: template or render function not defined.

found in

--> ReadMore ReadMoreComponent at resources/assets/js/components/read-more-component.vue Home at resources/assets/js/views/Home.vue Root

Thanks!

liolios avatar Apr 18 '18 15:04 liolios

Hi @liolios , problem in your code is, that you are calling read-more plugin as a component, not as a plugin. In your main.js paste these two lines of code.

import ReadMore from 'vue-read-more'
Vue.use(ReadMore)

And then in your component simply use tag.

pfasang avatar May 15 '18 08:05 pfasang

Thanks. That wasn't clear to me either. Working now :)

jomofrodo avatar Nov 14 '18 00:11 jomofrodo