On Fri, Jun 14, 2013 at 2:28 PM, Chris Mueller <
chris....@gmail.com> wrote:
> Is there a better way to do this?
It depends. Here is how we did it, it is very simple:
1. No configuration data goes into module.config. We consider
module.config to be configuration data in and of itself, eg route
definitions and stuff so that is that. The issue is trying to use
services in there, and you can't, you may only use providers.
2. Configuration data we stick it in a json file that is unique to
dev, qa, or prod, and that gets pushed out with the app.
3. There is a service named 'Config', responsible for loading the
config, and it returns a promise. In the module.run, the config gets
loaded before any other work is done.
I guess our goal is a little different, it is not about loading a
bunch of data? Config gets used all over for url bases and stuff like
that. In your case, you might do the same thing though with a service
instead.