Is it possible to update a dynamic parameter in the URL for the current route without recreating the route's view?
Specifically, say I have a route that handles post/:post_id
. The view for this route shows the post with the given id
but (in an infinite-scroll style) also allows the user to smoothly scroll down to subsequent posts. I'd like to update the url to reflect the post they are currently viewing. If I call reaplceWith('post', newlyFocusedPost)
the renderTemplate
hook fires, my original view is destroyed, a new view rendered, and the smoothness is lost.
I'd love the equivalent of Backbone.js's:
router.navigate('posts/123', {navigate:false, replace:true});
Another solution would be if rendering the same template into the same outlet reused the existing view and just updated its bindings.
(My current solution is to use a subroute, postAtId
, that handles the dynamic id with no view plus a call to controllerFor('post').set('content', newPost)
)