Have a situation where I would like to have two types of interface. One is the default application, and the other is a fullscreen mode for login screens etc.
After playing around for a while, I thought I'd try using two named outlets in the application template:
{{outlet main}}
{{outlet alternative}}
I then have a master template:
{{partial "wrapper"}}
{{outlet}}
{{partial "footer"}}
Which gets rendered into {{outlet main}} by (I'm using Ember App Kit, so the below is equivalent to App.ApplicationRoute = Ember.Route.extend({...):
export default Ember.Route.extend({
renderTemplate: function() {
this._super();
this.render('master', {
outlet: 'main',
into: 'application'
});
},
});
Now, the issue is when I want to blow away the master template, and have a different look and feel to the page altogether, like a fullscreen login page, with no wrapper/sidebar or footer.
I thought I could deactivate {{outlet main}} with disconnectOutlet in my LoginRoute, and just push the new login template to {{outlet alternative}} like so:
export default Ember.Route.extend({
renderTemplate: function() {
this.disconnectOutlet({
outlet: 'main',
into: 'application'
});
this.render('login', {
outlet: 'alternative',
into: 'application'
});
},
});
This though, results in {{outlet main}} still being rendered (I imagine due to the ApplicationRoute - renderTemplate of LoginRoute doesn't override it?), and the login template renders underneath it (aka, down the page/below the fold).
Does anyone know how to perform this complete switching of UI in Ember?