How to implement a change of layout `s in the application?

There is an application with the possibility of authorization, after authorization you need to change the basic layout, there is 2 layout `a: for the guest and for the authorized user.

At the moment there is such an implementation: using two root abstract state `s:

$stateProvider // Для гостя .state('site', { abstract: true, views: { '' : { templateUrl: 'site.html'}, } }) // Для авторизированного .state('main', { abstract: true, views: { '' : { templateUrl: 'main.html'}, } }) 

Then in the modules that are accessible only by authorized users, the parent state "main" is used.

 $stateProvider // главная страница для гостя .state('site.home', { url: "/", views: { header: ..., body: ..., footer: ... } }) // главная страница для пользователя .state('main.home', { url: "/", views: { header: ..., body: ..., footer: ... } }) 

This option is not convenient because you need to be attached to the state of the main module (app), advise implementation options, so to speak BEST PRACTICE.

  • it is not clear what you want. Can you give more details on what you want to get? - Grundy
  • It is necessary to implement a display mapping change in the main module globally for all other (children) modules. - Yaroslav Goyssa
  • you can, for example, use the nominal view - Grundy
  • The mappings for the guest and the authorized user are completely different at the page frame level - Jaroslav Gojs
  • and? I'm talking about personal view - Grundy

0