Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>UPDATE: This code is outdated, due to the Ember api changes.</strong></p> <p>I have reached a point, where I can say that I found the solution which is best for myself.</p> <pre><code>&lt;script type="text/x-handlebars" data-template-name="application"&gt; &lt;div class="container"&gt; &lt;div class="toolbar"&gt;{{outlet toolbar}}&lt;/div&gt; &lt;div class="main"&gt;{{outlet dashboard}}&lt;/div&gt; &lt;div class="sidebar"&gt;{{outlet sidebar}}&lt;/div&gt; &lt;/div&gt; &lt;/script&gt; </code></pre> <p>Using such a application template, I can choose where to render views. Like this:</p> <pre><code>App.router = Ember.Router.create({ enableLogging: true, location: 'history', root: Ember.Route.extend({ index: Ember.Route.extend({ route: '/admin/', redirectsTo: 'login' }), login: Ember.Route.extend({ route: '/admin/login/', doLogin: function(router, context) { "use strict"; router.transitionTo('dashboard', context); }, connectOutlets: function (router, context) { "use strict"; router.get('applicationController').connectOutlet('login', "login"); } }), dashboard: Ember.Route.extend({ route: '/admin/dashboard/', doLogout: function(router, context) { "use strict"; router.transitionTo('login', context); }, connectOutlets: function (router, context) { "use strict"; router.get('applicationController').connectOutlet('sidebar', 'sidebar'); router.get('applicationController').connectOutlet('toolbar', 'toolbar'); router.get('applicationController').connectOutlet('dashboard', 'dashboard'); } }) }) }); </code></pre> <p>I have the three views, which are not important from the solution point of view, those get rendered to their outlets.</p> <p>Hope this helps others.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload