Keep old template in it's outlet, while chaining route and render new route in another outlet


#1

We are making an ember app, and we want it to have a modal window for it’s ProductView. That view is also required to have a route, so it’s linkable. The modal is rendered to a specific outlet, with some special css classes making it modal-y.

The problem is that when changing the route, ember of course removes the old view from the dom. Our aim is to keep the old view rendered in it’s outlet, but render the new route’s template/view in the modal outlet. Is this doable without too bad hacks, in ember?


#2

Yeah, for sure, easiest way to do it is to put your modal outlet in your application template, because that’s actually the only template that persists across all your routes, right? It can be a little more involved if the route is actually a modal. Look into the renderTemplate method, though, and if you get stuck, ping me on SO.