New to vuejs, so there is a constant router object
const constantRouterMap = [{
a,b,c }]
and imported to Router object
new Router({
mode: 'history',
...
......
routes: constantRouterMap
})
And I have also added routers in a js file
import router from '@/router'
.......
.....
router.addRoutes(dynamicRouters)
Then I tried to get all routes with
router.options.routes
or
getRoutes()
But this only gives me 3 routes from constantRouterMap . How can I get all routes included the routes I created dynamically ?