mostafalaravel
7 months ago
12
1
Vue

Unknown custom element: <paginate>

Posted 7 months ago by mostafalaravel

Hello ,

I installed vuejs-paginate :

https://www.npmjs.com/package/vuejs-paginate

but I have this error message :

[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

main.js

import Vue from 'vue'
import App from './App.vue'
import axios from 'axios'
import VueAxios from 'vue-axios'

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
}).$mount('#app')

Vue.use(VueAxios, axios)
Vue.use(require('vue-moment'))

import Paginate from 'vuejs-paginate'
Vue.component('paginate', Paginate)

my component template :


            <paginate
                    :page-count="20"
                    :page-range="3"
                    :margin-pages="2"
                    :click-handler="clickCallback"
                    :prev-text="'Prev'"
                    :next-text="'Next'"
                    :container-class="'pagination'"
                    :page-class="'page-item'">
            </paginate>

App.vue

<script>
//import HelloWorld from './components/HelloWorld.vue'
import actions from './components/actions.vue'
import './assets/css/main.css'


export default {
  name: 'app',
  components: {
    //HelloWorld,
    actions

  }
}
</script>

thanks

Please sign in or create an account to participate in this conversation.