I have to two different Site Views with different regions.
How can I in proper way write composition in beforeAction method ?
What I want
beforeAction: function(params, route) {
if (route === 'sessions#new') {
this.reuse('site', OutsideSiteView);
this.reuse('header', OutsideHeaderView);
this.reuse('footer', OutsideFooterView);
} else {
this.reuse('site', SiteView);
this.reuse('header', HeaderView);
this.reuse('footer', FooterView);
}
}
My solution was
But I am not sure that it is proper solution