@fguillen wrote:
I have a model Post which has a method that returns the
nextPost
.I want to build a navigation bar that allows me to go to the next post.
This can work like this:
<!-- templates/post.hbs --> {{#link-to 'posts' model.nextPost}} {{model.nextPost.title}} {{/link-to}}
The problem is that I want to render this control on the outer level, this is in the
application.hbs
template but in there I have not access to the model/post that is actually rendered.Check diagram:
How can I deal with this situation?
Posts: 2
Participants: 2