I've got an application template that houses an outlet in a section tag, and also includes some other tags like a header, footer etc. The outlet gets used when I root to, say, a posts route and it uses the PostsController. The page then gets filled out with the posts template. However when I navigate to the home route /, then the #main section is blank.
<header>My header</header>
<section id='main'>
{{ outlet }}
</section>
<footer>My footer</footer>
I'd like to use that outlet to display something when I'm at the home route, but have that outlet filled with something else (like the posts template) when I navigate to posts. I've tried doing something like adding:
{{#if isRoot}}
lorem ipsum
{{/if}}
and then adding this to the applicationController:
App.ApplicationController = Ember.Controller.extend({
isRoot: true
})
but even when I navigate to posts that remains true (as I understand it, because the other controllers are nested inside the application controller). What's an idiomatic way to solve this?