I’m trying to setup an application with 2 layouts:
- non-authenticated.hbs: for landing pages, sign-up, password-retrieval, etc.
- authenticated.hbs: all other pages
Since i have a bunch of authenticated resources and routes, i tried to: Set layoutName in Ember.View.Reopen, and then set layoutName only in the login view (views/login.js), trying to avoid creating view files for each view only to extend a view with layoutName pre-defined.
// ext/view.js
export default Ember.View.reopen({
layoutName: "layouts/authenticated"
});
and:
// views/login.js
export default Ember.View.extend({
layoutName: 'layouts/non-authenticated'
});
But when i do this, i got an infinite loop and a “too much recursion” error, and i suppose i understand why.
Is there any other way to achieve this?