Best practices for connection strings?

I maintain a set of connection strings (local, dev, stg, prod) and prefer to keep this in a single spot to change only once. During development and testing I threw these into a config.json in www/ and used $.getJSON to grab my serviceBase url and all was well. Once I started testing in the iOS emulator or on a device this no longer works! I can temporarily resolve the issue by hard-coding the serviceBase into my javascript but this is obviously not good.

What is a better solution for storing connection strings in my Ionic app?