I’m very confused about the best practise to store very global stuff. I think there is a DI Framework, but its not well documentated, and really hard to understand.
So where should the globals that I need to fetch the models from the server store like an authentication token or a company name?
I Access my Models from Routes and Controllers, so I need to access the Globals from both, or directly from my Models.
I’ve parent routes for the globals, so I think about a way to access somehow the parent route from the controller and the nested routes and store it there, but how?
I can access parent models with modelFor on the route, but not on the controller, and controllerFor gives me the controller before the setupController hook runs so just a useless controller.
May I’m thinking in the wrong direction, but whats the right one?