My Goal: emulate nested route, but render it into application outlet.

For example:

/videos - top route

/videos/video001 - nested route

/videos/video001/slide001 - not nested. It is on the same level as /videos.

How I am doing this:

I have following router:

App.Router.map(function () { this.resource('videos', { path: '/videos' }, function () { this.resource('video', { path: '/:video_id' }); }); this.resource('slide', { path: '/videos/:video_id/:slide_id' }); });

To make 'slide' route work as expected I am overriding 'serialize' method, and return 'video_id' and 'slide_id'

And at this point everything seems to be ok. At least page loads as expected.

What is the issue?

When I navigate to "/videos/video001" from "/videos/video001/slide001" via "link-to' helper, I see following error: "Error while processing route: video". And nothing more. I can't understand what kind of error happens and why ember can't process route correctly. However I see that URL has been changed to "/videos/video001".

Any suggestions? How to debug this situation or at least get any useful error message?

UPDATE This article describe exact current situation and gives some solutions: http://hashrocket.com/blog/posts/ember-routing-the-when-and-why-of-nesting