Link-to renders into the {{outlet}} of application.hbs

I have a link-to helper defined in dashboard.hbs template:

#dashboard.hbs
{{#link-to 'information' class="nav-link active"}}
            <span class="oi oi-dashboard" title="dashboard" aria-hidden="true"></span>
            {{t 'sidebar.general.info'}}
          {{/link-to}}
<div>
{{outlet}}
</div>

But when I click on the above link, the content of information.hbs is injected in application.hbs outlet block instead of to be in {{outlet}} of dashboard.hbs`. What am I doing wrong ?

Ah, my bad, I figured out the reason: I had to use nested routes and templates to get it working. Putting information.js route inside the dashboard.js in router.js and the same for its template.

1 Like