title: Access Rails env variable from Angular Controller
body: <p>I have the following module called EnvConfigurationService,js.erb:</p>
  
  <pre><code>#../angular/services/config/EnvConfigurationService,js.erb
  
  angular.module('mgApp.services').factory('EnvConfigurationService', function () {
  return {
      getMySecretKey: function () {
          return "&lt;%= ENV['MY_SECRET_KEY'] %&gt;";
      }
    }
  });
  </code></pre>
  
  <p>The intention is to provide access to 'MY_SECRET_KEY' from different angular and regular js classes. Like the following on userController.js:</p>
  
  <pre><code>angular.module('mgApp.controllers').controller('userController', ['$scope', '$http', 'EnvConfigurationService', function($scope, $http, EnvConfigurationService) {
    var uri = EnvConfigurationService.getMySecretKey();
    ...
  }]);
  </code></pre>
  
  <p>Still, the returned string is always empty. Any ideas what might be wrong/missing?</p>
  
  <p>Thanks in advance</p>