User Tools

Site Tools


ember-routes-and-troubleshooting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
ember-routes-and-troubleshooting [2022/06/27 22:28]
sausage [Acknowledgements]
ember-routes-and-troubleshooting [2022/06/27 22:35] (current)
sausage
Line 142: Line 142:
 {{ :​ember:​songs-template-songsindex-template-browser.png?​nolink |}} {{ :​ember:​songs-template-songsindex-template-browser.png?​nolink |}}
  
-Well that's interesting,​ the template of ''​template/​songs/​index.hbs''​ is displaying inside the ''​%%{{outlet}}%%''​ of the ''/​templates/​songs.hbs''​ template. ​Why is that?+Well that's interesting,​ the template of ''​template/​songs/​index.hbs''​ is displaying inside the ''​%%{{outlet}}%%''​ of the ''/​templates/​songs.hbs''​ template. ​We've made a nested route. How did we do that?
  
 The URL of ''/​songs''​ matches both the route files of ''/​routes/​songs.js''​ and ''​routes/​songs/​index.js''​. But ''​songs.hbs''​ is treated as the parent, and the ''​songs/​index.hbs''​ is a child and is rendered into the patent'​s ''​%%{{outlet}}%%''​. As you can imagine, this is very useful for setting up parent templates (common headers and footers etc) and child content. The URL of ''/​songs''​ matches both the route files of ''/​routes/​songs.js''​ and ''​routes/​songs/​index.js''​. But ''​songs.hbs''​ is treated as the parent, and the ''​songs/​index.hbs''​ is a child and is rendered into the patent'​s ''​%%{{outlet}}%%''​. As you can imagine, this is very useful for setting up parent templates (common headers and footers etc) and child content.
ember-routes-and-troubleshooting.txt ยท Last modified: 2022/06/27 22:35 by sausage