This question already has an answer here:
- How to make linkTo dynamic in ember? 2 answers
What is the proper syntax to use an objects property as the 'link-to' or other value in a handlebars expression? For example, I want to use {{page.slug}}
<ul class='main-menu'>
{{#each model as |page|}}
<li>
{{#link-to 'HERE'}}
{{page.title}}
{{/link-to}}
</li>
{{/each}}
</ul>
Also, this may be a hacky way of making a menu, but is more about how I came to the question.
Aucun commentaire:
Enregistrer un commentaire