[frontend] add a configuration object to store app-wide variables.
[frontend] fix loading of modules.

Define the angular where needed because not part of the scope when using
define().