I have an Ember app which has the concept of a "message center" and if a user click on the messages button then a modal dialog pops up and they can view their messages but meanwhile the route
has not changed and therefore the backdrop of the modal window is still whatever context/route that the user was on before checking their messages. Make sense?
In order to implement this I thought I'd use the {{render}}
functionality in my application.hbs
, like so:
<p>PAGE HTML, ETC.</p>
{{#if showMessageCenter}}
<div id="messageCenter">
TESTING
{{render messages}}
</div>
{{/if}}
When the user clicks on "messages" the showMessageCenter
attribute is flipped to true
and the "TESTING" message appears but that's it. The messages template that I was expecting is not there. Further to my surprise I see this from the Ember debugger:
As you can see messages
is listed under the names and an appropriate reference to the controller App.MessagesController
has been established but the template is listed as "inline". How do I get this to resolve to messages.hbs
?