I have defined a constant object in coffeescript:
angular
.module 'main',
[]
.constant 'CONFIG',
IMAGEROOT: 'http://some-img.s3-website-ap-southeast-1.amazonaws.com/'
When using the constant in html, I write it like this:
<img ng-src="{{CONFIG.IMAGEROOT}}assets/img/
To avoid having to set $scope.CONFIG=CONFIG
in every controller, I am wondering if there is a way to make a constant global and accessible for any $scope.
Would adding an outermost controller (parent scope) be the right approach to store this constant?