Module resolvers don't exist in Angular 2, but I wonder how to workaround and simulate this behavior.
My problem is: I have a TransService that load translation data from a URL and store it inside the service itself as a static property, so this is a once-in-app-life request and there's no need to do this request again. I need to make the application WAIT until this request is done since this translation data is used in every single part of the application (both templates and components).
Known Solutions: 1- Use sync http request at the top level of the application before angular itself is loaded, but it's non-user-friendly and highly not recommended by every tutorial for obvious reasons. 2- Use routes resolvers, but it's a lot of duplicated code since I'll to add it to every single route and I'll also need to verify if the data is already loading before triggering the observable again, as I said I need this request to be made only once.
I think I need to mess up with the app bootstrap lifecycle, but I lack information about some of angular 2 concepts and the docs aren't very helpful since it's still migrating from RC to stable releases.
Version of angular 2 I'm using: ^2.0.0.