Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var siteRoutes = {
'login': 'layouts/login',
'index': 'layouts/site'
};
App.ApplicationView = Ember.View.extend({
layoutName: function () {
var currentPath = this.get('controller.currentPath');
if (siteRoutes[currentPath]) {
return siteRoutes[currentPath];
}
}.property('controller.currentPath'),
updateLayout: function () {
this.rerender();
}.observes('layoutName')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.