Is it feasible to inject one constant into another constant using AngularJS?
For example:
var app = angular.module('myApp');
app.constant('foo', { message: "Hello" } );
app.constant('bar', ['foo', function(foo) {
return {
message: foo.message + ' World!'
}
}]);
I specifically require the use of an angular constant in order to inject it into a configuration routine. For instance:
app.config(['bar', function(bar) {
console.log(bar.message);
}]);
I am aware that constants and providers can only be injected into configuration routines, and although I understand that you can perform dependency injection into providers, it may not be the most suitable approach for this type of scenario...
Thank you in advance for any assistance provided!