Files
jambotron/jambotron-ui/src/app/global-constants.ts
T

25 lines
602 B
TypeScript

import {environment} from '../environments/environment';
export class GlobalConstants {
public static readonly TITLE = (() => {
return environment.title;
})();
public static readonly DEFAULT_PAGE = (() => {
return environment.default_page;
})();
public static readonly API_URL = (() => {
// ... calculate the value and return it
if(environment.production) {
return `${environment.host_name}/api`;
}else {
//return `${environment.host_name}:${environment.port}/api`;
return `/api`; // in serve mode used proxy (proxy.conf.json)
}
})();
}