[Vuejs]-Dynamic Navigation using Vue Router?

0👍

You can inject additional routes at any time, You don’t have to declare up front.

You could make use of router.addRoutes so you can iterate your object of content and generate the routes on application beforeMount or beforeCreate where you would do this.$router.addRoutes(…).

https://v2.vuejs.org/v2/api/#beforeMount

https://v2.vuejs.org/v2/api/#beforeCreate

https://router.vuejs.org/api/#router-addroutes

👤Marc

Leave a comment