Skip to content

Commit

Permalink
Revert "[location] add host + port + protocol."
Browse files Browse the repository at this point in the history
This reverts commit f00490d.
  • Loading branch information
aitboudad committed Jan 3, 2017
1 parent e69339a commit b649735
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions src/ng2/location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class UIRouterLocation {
this.isHashBang = locationStrategy instanceof HashLocationStrategy;
}

init(): void {
init() {
let loc = services.location;
let locSt = this.locationStrategy;

Expand Down Expand Up @@ -63,23 +63,9 @@ export class UIRouterLocation {

let locCfg = <any> services.locationConfig;

locCfg.port = function(): any {
const location = window.location;
if (location.port !== '') {
return location.port;
}

const protocol = locCfg.protocol();
if (protocol === 'http') {
return 80;
}

if (protocol === 'https') {
return 443;
}
};
locCfg.protocol = () => window.location.protocol.replace(':', '');
locCfg.host = () => window.location.hostname;
locCfg.port = () => null as number;
locCfg.protocol = () => null as string;
locCfg.host = () => null as string;
locCfg.baseHref = () => locSt.getBaseHref();
locCfg.html5Mode = () => !this.isHashBang;
locCfg.hashPrefix = (newprefix: string): string => {
Expand All @@ -90,3 +76,4 @@ export class UIRouterLocation {
};
}
}

0 comments on commit b649735

Please sign in to comment.