I am writing the javascript, AngularJS app using typescript. Also I am using grunt for building. In fact I have started off with ng boilerplate.
Now suppose I have a config.json file something like below-
{
"app": "abc",
"login": "xyz"
}
I want some variables in my app to be configurable. So at some place I could use something like -
var loginUrl : string = "def?pqr="+config.app;
Now how can I read this config in my javascript files? I am looking for best practice answer. I am fine with substitution at grunt build step also.
Note: The config file is present on client itself, i.e no need to load it from server separately.