1 define(['angular'], function (angular) {
4 var config = angular.module('config', [])
8 adSalPort: '@@adSalPort',
9 mdSalPort: '@@mdSalPort',
10 mdSalSecuredPort: '@@mdSalSecuredPort',
11 configEnv: '@@configEnv',
12 getBaseURL: function (salType) {
13 if (salType !== undefined) {
15 if (this.configEnv === 'ENV_DEV') {
16 urlPrefix = this.baseURL;
18 urlPrefix = window.location.protocol + '//' + window.location.hostname + ':';
21 if (salType === 'AD_SAL') {
22 return urlPrefix + this.adSalPort;
23 } else if (salType === 'MD_SAL') {
24 var basePort = this.mdSalPort;
25 if (window.location.protocol === 'https:') {
26 basePort = this.mdSalSecuredPort;
28 return urlPrefix + basePort;