title: Ember Routing - Dynamic Segment - Passing model through <LinkTo>
body: <p>I am using Ember 3.18 and i have issue with dynamic segment. Here is my <code>router.js</code></p>
  
  <pre><code>Router.map(function() {
  
      this.route('posts');
  
      this.route('post' , {path:"/post/:post_id"});
  
  });
  </code></pre>
  
  <p>When I try to perform a transition from posts route (which contains all the posts) to post/:post_id (which displays the details of the particular post) using the following </p>
  
  <pre><code>&lt;div&gt;
  {{#each this.data as |data|}}
  
     &lt;LinkTo @route="dashboard.inbox-mail" @model={{data.id}}&gt;
  
      &lt;div class="card"&gt;
        &lt;div&gt;
          &lt;p class="name"&gt;{{data.name}}&lt;/p&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;p class="title"&gt;{{data.title}}&lt;/p&gt;
          &lt;p class="date"&gt;{{data.timestamp}}&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
    &lt;/LinkTo&gt;
  
   {{/each}}
  &lt;/div&gt;
  </code></pre>
  
  <p>it does not performs the transition to the post/:post_id. The data contains following attributes </p>
  
  <p>id - string
  name - string
  title - string
  message - string
  timestamp - string</p>
  
  <p>my goal is to pass the post id to post/:post_id and make a API call in the model hook of post/:post_id.</p>
  
  <p>I was able to perform transition using the below code but the downside is that the beforemodel and model hook are not called. Passing the entire data as model results in not calling the model and beforemodel </p>
  
  <pre><code>&lt;div&gt;
  {{#each this.data as |data|}}
     &lt;LinkTo @route="dashboard.inbox-mail" @model={{data}}&gt;
      &lt;div class="card"&gt;
        &lt;div&gt;
          &lt;p class="name"&gt;{{data.name}}&lt;/p&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;p class="title"&gt;{{data.title}}&lt;/p&gt;
          &lt;p class="date"&gt;{{data.timestamp}}&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/LinkTo&gt;
    {{/each}}
  &lt;/div&gt;
  </code></pre>