Skip to content

Commit

Permalink
feat(history): add getAbsoluteRoot method
Browse files Browse the repository at this point in the history
Per aurelia/router#88 we want to be able to generate an absolute URI with the `router.generate()` method. That method relies upon the history module. `getAbsoluteRoot` allows the router to generate a fully-qualified root URL.
  • Loading branch information
jwahyoung committed May 3, 2016
1 parent 9a13040 commit 96b5e6e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/index.js
Expand Up @@ -33,6 +33,13 @@ export class History {
throw new Error('History must implement deactivate().');
}

/**
* Returns the fully-qualified root of the current history object.
*/
getAbsoluteRoot(): string {
throw new Error('History must implement getAbsoluteRoot().');
}

/**
* Causes a history navigation to occur.
*
Expand Down

0 comments on commit 96b5e6e

Please sign in to comment.