Using a route to scroll to part of page in parent route

Hi, I have a an app with an endpoint like:


that renders an array of stories:

{{#each story in stories}}
    {{my-story-view model=story}}

I would like to add a subroute:


that scrolls to that story in the parent page if it exists… and does nothing if it doesn’t.

I am unclear how to proceed. I have a new route and controller for the individual story, can link to the parent controller (the array of stories), can detect if the model for the individual story exists, but can’t come up with a way to find the ‘my-story-view’ associated with the model so I can scroll to it.

Any ideas? Thanks for your help!

By the way, this is closely related to another (unanswered) post I found earlier: Using page sections as routes - #2 by ssirowy

I’ve done this. I made a gist for you:

The gist shows my scroll-here component. Then you’d also want to set up your routes so that they all render the same template, and use the scroll-here component to scroll to the right place.