2016-06-09 03:32:33 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
angular.module('core').factory('subdomain', ['$location', function ($location) {
|
|
|
|
var host = $location.host();
|
2017-04-23 02:28:30 +00:00
|
|
|
if (host.indexOf('.') < 0) {
|
2016-06-09 03:32:33 +00:00
|
|
|
return null;
|
2017-04-23 02:28:30 +00:00
|
|
|
}
|
|
|
|
return host.split('.')[0];
|
2016-06-09 03:32:33 +00:00
|
|
|
}]);
|