I’m tying to find the best practice concearning components that exist on app level and somehow have to respond to interaction on a lower level.
For example, I have a topbar component that is set in the application template. The topbar contains a title, a general pofile button and (has room for) context dependent buttons. According to the current route, the title and optional context buttons should change. Let’s say the login route should set the title to “welcome”, and the dashboard route should set the title to “Dashboard” and supply some buttons like “Add a new whatever”.
At first, I had the topbar assigned to window.topBar in the application controller, so I could access it directly from any route view. But this feels a bit dirty and highly unpractical now that the route is rendered before the application controller/template in the latest Ember release.
So, what is the best way to deal with this kind of situation in your opinion?