title: How to get route url params in a page in Nuxt2 and 3?
body: <p>I am using Nuxt.js, and have a dymanic page which is defined under </p>
  
  <pre><code>pages/post/_slug.vue
  </code></pre>
  
  <p>So, when I visit the page url, say, <a href="http://localhost:3000/post/hello-world" rel="noreferrer">http://localhost:3000/post/hello-world</a>, how can I read this slug parameter value inside my page.</p>
  
  <p>Currently I am geting it using asyncData as follows:</p>
  
  <pre><code>  asyncData ({ params }) {
      // called every time before loading the component
      return {
        slug: params.slug
      }
    }
  </code></pre>
  
  <p>This is working fine, but I think this is not the best way, and there should be a better way to make the parameter available to the page. Any help is appreciated! </p>