Displaying the Band's Name
You’ll learn to display the band's name and description on the band details page in this lesson.
Showing the band’s name and description
Let’s display the band’s name and description on the band details page by making the following modifications:
Press + to interact
{{!-- app/templates/bands/band/details.hbs --}}{{!-- {{page-title "Details"}}{{outlet}} --}}{{page-title @model.name " details | Rock & Roll with Octane" replace=true}}<h2 class="mb-4 text-lg">{{@model.name}}</h2><p>{{@model.description}}</p>
If we load up the application on /bands/pearl-jam
, everything works as expected and the app is transitioned to the bands.band.details
route, while the URL changes to /bands/pearl-jam/
details, since Pearl Jam has a description:
However, if you click on the Pearl Jam link again, you see an empty panel for the band instead of the band’s description:
That’s really weird. How can this happen?
Transitions of Ember router
The ...
Access this course and 1400+ top-rated courses and projects.