mercredi 31 décembre 2014

Ember sidebar - returning from "admin" sidebar to "normal"

My application route defines my sidebar as follows (routes/application.js):



renderTemplate: function() {

this.render();

// sidebar
this.render("partials/sidebar", {
outlet: "sidebar",
into: "application" // important when using at root level
});
}


When the user enters the admin area of the app, there is a special admin sidebar which is applied as follows (routes/settings.js):



renderTemplate: function() {

this.render();

// sidebar
this.render("partials/sidebaradmin", {
outlet: "sidebar",
into: "application" // important when using at root level
});
}


This works as you would expect. However, when leaving the settings area, the sidebar becomes blank.


What is the correct way to ensure that regardless of where the user transitions to, that the standard sidebar redraws?





Aucun commentaire:

Enregistrer un commentaire