Is there a way to set the data object when transitioning from a route using the transitionTo
method?
Upon entering the target route, I noticed that the transition
object in my model hook has an empty attribute data: {}
. What is the purpose of this object if it cannot be used to pass some data?
Update
After following @Ben's answer, I was able to achieve my goal by using the code:
this.transitionTo('route.name').data = {my: 'data'}