I have an application, which will have a view layer organized in three parts:
- Sidebar
- Toolbar-left
- Toolbar-right
I have spent may last few hours with trying to find something helpful with google, but I had no luck. I would need a short and complete application example on how to do this using Router and connectOutlet, with named outlets.
Thx ahead.
In your application template, you'll need to declare a named outlet as
{{outlet sidebar}}
. Likewise for the toolbars you mentioned.EDIT: The rest is out of date. As @dineth said, see Rendering a Template.
Then in your route (lets sayApp.NavigationView
is what you want to stick there):Sidebar example: http://jsfiddle.net/q3snW/7/
Reference this documentation on the
{{outlet}}
helper, and this documentation on the.connectOutlet
callback.With the new Router you can do something like this:
In your Route you can handle the content of the outlets:
You should have an
menu
-template though.You can read more about it here.
UPDATE: This code is outdated, due to the Ember api changes.
I have reached a point, where I can say that I found the solution which is best for myself.
Using such a application template, I can choose where to render views. Like this:
I have the three views, which are not important from the solution point of view, those get rendered to their outlets.
Hope this helps others.