I tried using Rails / Ember pre-4 to do a pretty typical thing that has a page with a navigation bar and a content section. Navbar changes only when you log in (the button for logging out when logging in and logging in and registering for logging out is displayed), and not on each page.
At first I thought I could do something in the application.hbs template, for example:
{{view navbar}} {{}} On exit
where I set navbar to respond to input state changes (managed by the state manager). This does not seem to work.
Then I tried something like (also in application.hbs):
{{outlet navbar}} {{}} At the exit
and tried to configure navbar in each route, which leads to a lot of duplication, and also ultimately does not work.
Before sending the code, you need to know if someone already has a good solution to this common situation, when some parts of your page, such as the navigation bar or sidebar, change only with some changes in the state of the application, and not on each page .
source
share