We have a single-user application with several Angular JS tenants. Routing for the application uses the client identifier as part of the URL — #/home/<KEY>or #/search/<KEY>/<search term>, for example. Theoretically, the first page served can be of any type. Each page calls the API using the client key and other values obtained from the URL to obtain data for this page. So far so good.
We have some options - logo, copyright, default language (for internationalization), which can be downloaded using a separate API call, which also uses the client key. These parameters should be available as partial strings in order to stimulate internationalization and possibly controllers.
The question is where to call the API to get these parameters and how to set them / make them available for the rest of the application. I looked at a bunch of questions in this general area, but I cannot find a concrete suggestion. Should I use the configuration in app.js? Call another script from index.html?
Appreciate the advice of people.
source
share