recently I've been using vue in frontend and vue-router with it to shape a SPA.
My problem is that I am not able to access a component defined in main Vue instance:
import ElementComponent from './Element';
const app = new Vue({
el: '#app',
router,
components: { Element: ElementComponent }
});
Whenever I do <element></element>
within the #app scope the component gets rendered but I can not use the element inside a route component.
My routes are defined like this:
var routes = [
{ path: '/section/part', component: require('../views/Part') }];
And then provided to router instance:
new VueRouter({routes});
Breakpoint whenever I try to call <element></element>
inside Part component template I get this in vuedevtools: [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
(found in at C:\Users\Doe\project\js\views\Part.vue)