What is the best way to create config file (Something like web config in .net), for storing urls, and other constants that may vary during the application deploy?
IMHO, I don't like handling config files with task runners. Cause you will need to rebuild your whole application just to change a line or two every time you need a different configuration.
Using the .config of angular is a good thing and I would do something like (borrowing from the example of the first answer)
angular.module('app').constant('MONGOLAB_CONFIG', {
baseUrl: '/databases/',
dbName: 'ascrum'
});
let's name this as app.config.js
And this will be linked in the .html right after the minified script like this
//the application's minified script
You can just then edit the app.config.js file without re running any tasks. So you can have different app.config.js files on different machines/environments without re building the app again and again