Add Environment Specific Configuration in AngularJS Using Grunt

One aspect of Rails I love is the simplicity of environment specific
configuration. Out the box, Rails provides configuration for development
and production environments and additions are effortless to implement.
Using Angular, I typically create a constants module for the application
configuration e.g. api url’s, third party service specific data, etc.
All of these can change based on the applications environment with which
it is deployed to. This post details an approach I used to configure an
AngularJS app constants based on configuration specific to the
environment using Grunt tasks.