Nuxt.JS: How to get route url params in a page

后端 未结 8 794
深忆病人
深忆病人 2021-02-06 21:06

I am using Nuxt.js, and have a dymanic page which is defined under

pages/post/_slug.vue

So, when I visit the page url, say, http://localhost:3

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-06 21:24

    Nuxt documentation is well maintained and as per the https://nuxtjs.org/api/context/ asyncData exposes API to access various router and server features. For your more clarification you can check out the official examples on Nuxtjs portal. https://nuxtjs.org/examples/custom-routes

提交回复
热议问题