Add data to the transition object

The transition object has a property called data, which the docs claim can be used to store custom state. How do I add data to the data object? All I can find is this Stack overflow article which suggests you can do the following:

this.transitionTo('route.name').data = {my: 'data'};

I’ve tried this but am still getting any empty data object on the resulting transition. Any help would be greatly appreciated!

1 Like

Which version of ember are you using? Where are you checking for the data? Is there any chance your transition is getting aborted and redirected with a new transition?