Skip to content

Commit

Permalink
Expose href property on location
Browse files Browse the repository at this point in the history
  • Loading branch information
clbond committed Mar 27, 2017
1 parent 10d467b commit 30be6f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "angular-ssr",
"version": "0.0.81",
"version": "0.0.82",
"description": "Angular server-side rendering implementation",
"main": "build/index.js",
"typings": "build/index.d.ts",
Expand Down
6 changes: 5 additions & 1 deletion source/platform/location/location.ts
Expand Up @@ -16,12 +16,16 @@ export class LocationImpl implements PlatformLocation, OnDestroy {
private destruction = new Array<() => void>();

constructor(
@Inject(RequestUri) requestUri: string,
@Inject(RequestUri) private requestUri: string,
private documentContainer: DocumentContainer
) {
this.documentContainer.document.location.assign(requestUri);
}

get href(): string {
return this.requestUri;
}

getBaseHrefFromDOM(): string {
const element = this.documentContainer.document.querySelector('base');
if (element == null) {
Expand Down

0 comments on commit 30be6f2

Please sign in to comment.