Open BinarySpike opened 5 years ago
Based on this example: https://github.com/vuejs/vue-router/issues/298#issuecomment-406306711
// router.js import Vue from "vue"; import Router from "vue-router"; import Component from "components/component.vue"; Vue.use(Router); export default new Router({ mode: "history", routes: [ { path: "somepath", component: Component, children: Component.routes } ] });
// components/component.vue import SomeChildComponent from './'; export default { routes: [ { path: "/somechildpath", component: SomeChildComponent }, ] };
Is there a way to do this with httpVueLoader? The magic is on children: Component.routes. When I define routes on the module.exports = I can't find it on the resolved promise:
children: Component.routes
routes
module.exports =
<template> <h1>Test</h1> <router-view></router-view> </template> <script> module.exports = { routes = { '/test', component: httpVueLoader('test.vue') } } </script> <style scoped> </style>
Here's a vue issue that might shed some light on what I'm trying to accomplish with httpVueLoader: https://github.com/vuejs/vue-router/issues/715
Thanks!
Based on this example: https://github.com/vuejs/vue-router/issues/298#issuecomment-406306711
Is there a way to do this with httpVueLoader? The magic is on
children: Component.routes
. When I defineroutes
on themodule.exports =
I can't find it on the resolved promise: