S
S
sinneren2019-10-17 13:02:57
Vue.js
sinneren, 2019-10-17 13:02:57

How to make a dynamic route with cnc parameters in nuxt?

There is a route /catalog/<%code%>/
Everything is clear here:

pages/
  catalog/
    _code.vue

And I also need an additional route, when the url will look like /catalog/<%code%>/param/
where param is some string known in advance, for example, "discount".
How to implement it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sinneren, 2019-10-17
@sinneren

pages/
  catalog/
    _code/
      _.vue

all the magic in ._vue
https://nuxtjs.org/guide/routing/#unknown-dynamic-...

A
Anton Anton, 2019-10-17
@Fragster

pages/
  catalog/
    _code/
        index.vue
        discount.vue

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question