1 year ago

Vue component not showing up

Posted 1 year ago by Shiva

My vue component isn't showing up and I can't see where I went wrong, I'm hoping another set of eyes can point out where I went wrong. I'm running npm run watch and I've cleared my cache.

My app.js

 * First we will load all of this project's JavaScript dependencies which
 * includes Vue and other libraries. It is a great starting point when
 * building robust, powerful web applications using Vue and Laravel.


window.Vue = require('vue');

 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.

Vue.component('table-draggable', require('./components/TableDraggable.vue'));
Vue.component('category-index', require('./components/CategoryIndex.vue'));
Vue.component('active-checkbox', require('./components/ActiveCheckbox.vue'));
Vue.component('supplier-code-selection', require('./components/SupplierCodeSelection.vue'));

const app = new Vue({
    el: '#app'

My SupplierCodeSelection.vue

    <div class="container">
        <div class="row justify-content-center">
            <div class="col-md-8">
                <div class="card">
                    <div class="card-header">Supplier Code Selection Component</div>

                    <div class="card-body">
                        I'm an example component.

    export default {
        mounted() {
            console.log('Component mounted.')

and my page that the vue is supposed to show

<div id="app">

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