What is the approved way of externalizing string constant in Angular 2 application, or in JavaScript application in general? I mean something like .properties
file in Java, where backend connection attributes are stored.
As far as I know, JavaScript doesn't support reading from file in client end easily. My current solution is to use injectable service class, which stores key-value pairs as an object attributes. Then I just inject the service in other services which needs those values. Is this justifiable method, or does JavaScript/A2 provide some more uniform way to handle value injection?