I'm creating an App that different customers should use. The things that will differ between the customers is for example the brand name and the server URL.
I have seen the constant()
method, but I don't really understand it.
For example:
<body>
Welcome to {{brandName}} homepage.
We use the server {{server.url}} for our REST calls.
</body>
I'm thinking a file conf.js
var brandName = "Örkelljunga IF"
var server = {
"url": "Orkelljunga.com",
"otherinfo" : "Other Information"
}
export.brandName = brandName;
export.server = server;
And then access it from constant()? How do I achieve this?
Any examples and maybe best practices in Angular?