Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

aurelia-history-browser

aurelia44.6kMIT1.4.0TypeScript support: included

An implementation of the Aurelia history interface based on standard browser hash change and push state mechanisms.

aurelia, history, router

readme

aurelia-history-browser

npm Version Join the chat at https://gitter.im/aurelia/discuss CircleCI

This library is part of the Aurelia platform and contains an implementation of the Aurelia history interface based on standard browser hash change and push state mechanisms.

To keep up to date on Aurelia, please visit and subscribe to the official blog and our email list. We also invite you to follow us on twitter. If you have questions look around our Discourse forums, chat in our community on Gitter or use stack overflow. Documentation can be found in our developer hub.

Platform Support

This library can be used in the browser only.

Building The Code

To build the code, follow these steps.

  1. Ensure that NodeJS is installed. This provides the platform on which the build tooling runs.
  2. From the project folder, execute the following command:

    npm install
  3. To build the code, you can now run:

    npm run build
  4. You will find the compiled code in the dist folder, available in three module formats: AMD, CommonJS and ES6.

Running The Tests

To run the unit tests, first ensure that you have followed the steps above in order to install all dependencies and successfully build the library. Once you have done that, proceed with these additional steps:

  1. You can now run the tests with this command:

    npm run test
  2. You can run the tests in watch mode (headless Chrome):

    npm run test:watch
  3. You can run the tests in watch mode (with Chrome for debugging):

    npm run test:debugger

changelog

1.4.0 (2019-05-31)

Bug Fixes

  • browser-history: decode fragment, add tests (957532d)

1.3.2 (2019-04-20)

1.3.2 (2019-03-27)

Bug Fixes

  • all: change es2015 back to native-modules (9cd5fb8)

1.3.1 (2019-02-04)

Bug Fixes

  • all: change es2015 back to native-modules (9cd5fb8)

1.3.0 (2019-01-18)

Features

  • add support of data-router-ignore attribute (0d8f7a0)
  • Add go method
  • Add history index getter

1.2.0 (2018-06-13)

Bug Fixes

  • history-browser: Ensure all navigate() paths return a value (47beb9b)
  • index: revert return types (0481af4)
  • typing: update return types (e1a574a)

1.1.1 (2018-02-24)

Bug Fixes

  • history-browser: Add location.href to replaceState() call (424c252)

1.1.0 (2017-09-29)

Features

  • history-browser: add getState and setState

1.0.0 (2016-07-27)

1.0.0-rc.1.0.0 (2016-06-22)

1.0.0-beta.1.2.1 (2016-05-10)

Features

  • history-browser: add getAbsoluteRoot method (c5bb6811)

1.0.0-beta.1.2.0 (2016-03-22)

  • Update to Babel 6

1.0.0-beta.1.1.4 (2016-03-01)

Bug Fixes

  • all: remove core-js dependency (209629f8)

1.0.0-beta.1.1.3 (2016-03-01)

Bug Fixes

  • all: remove core-js dependency (209629f8)

1.0.0-beta.1.1.2 (2016-02-08)

1.0.0-beta.1.1.0 (2016-01-28)

1.0.0-beta.1.0.1 (2015-12-03)

Bug Fixes

  • history-browser: open link in new tab when it clicked with middle button (8acf18fe)

1.0.0-beta.1 (2015-11-16)

0.10.0 (2015-11-09)

Bug Fixes

  • index: update to latest container api (4690d655)

Features

  • history: implement method for setting document title (dc17f75c)

0.9.0 (2015-10-13)

Bug Fixes

  • all:
  • bower: correct semver ranges (9c7f33f5)
  • build:
    • update linting, testing and tools (9ad076d6)
    • add missing bower bump (5b4cc6f3)
  • history:
    • Improved previous pushState security fix by only fixing up double slashes in fra (9d7565a1)
    • fixed regression issue which added double slashes to the pushState fragment (57983341)
    • normalize fragments with a leading slash (66998d87)
    • fix incorrect falsey check in getFragment (34cb8224)
  • history-browser:
    • verify that window is defined in ctor (78449060)
    • Use correct import for core-js We were previously using `import core from core-j (45d51c8c)
    • support scheme-relative URLs in BrowserHistory.navigate() (16fcfdd7)
  • index: update to latest configuration api (a3681cfb)
  • normalize-fragment: fix getFragment() to return normalized values (5cb9bf30)
  • package:
    • update aurelia tools and dts generator (ee59abbc)
    • change jspm directories (2b161b23)
    • update dependencies (d56c60df)
    • update dependencies (0f9bc51a)
    • update Aurelia dependencies (770590c2)
    • add es6-shim dependency for Object.assign (517b7e8e)
    • update dependencies to latest (cdd1c232)

Features

  • all: leverage the PAL (01cd524c)
  • build: update compiler and switch to register module format (ff2a572b)
  • docs: generate api.json from .d.ts file (80fd2e30)
  • history: enable usage as plugin (f73c967b)
  • history-browser:
    • move link handler from router and allow custom implementations (f0129d89)
    • adjust default navigate options (0f17175d)
    • allow replace option to trigger a navigation to the same fragment (1eab2945, closes #201)

Breaking Changes

  • trigger now defaults to true when other options are specified, and options must be passed as an object; a boolean is no longer supported as a shortcut for trigger.

    (0f17175d)

0.8.0 (2015-09-04)

Bug Fixes

  • build: update linting, testing and tools (9ad076d6)

Features

  • docs: generate api.json from .d.ts file (80fd2e30)

0.7.0 (2015-08-14)

Bug Fixes

  • history-browser: Use correct import for core-js We were previously using `import core from core-j (45d51c8c)
  • index: update to latest configuration api (a3681cfb)

0.6.2 (2015-07-29)

  • improve output file name

0.6.1 (2015-07-07)

Bug Fixes

  • history:
    • Improved previous pushState security fix by only fixing up double slashes in fra (9d7565a1)
    • fixed regression issue which added double slashes to the pushState fragment (57983341)

0.6.0 (2015-07-01)

Bug Fixes

  • history: normalize fragments with a leading slash (66998d87)
  • package: update aurelia tools and dts generator (ee59abbc)

0.5.0 (2015-06-08)

Bug Fixes

  • history-browser: support scheme-relative URLs in BrowserHistory.navigate() (16fcfdd7)
  • normalize-fragment: fix getFragment() to return normalized values (5cb9bf30)

0.4.0 (2015-04-30)

Bug Fixes

  • all: update to latest plugin api (85418be2)

0.3.0 (2015-04-09)

Bug Fixes

0.2.5 (2015-02-28)

Bug Fixes

  • package: change jspm directories (2b161b23)

0.2.4 (2015-02-27)

Bug Fixes

  • build: add missing bower bump (5b4cc6f3)
  • package: update dependencies (d56c60df)

0.2.3 (2015-01-24)

Bug Fixes

  • bower: correct semver ranges (9c7f33f5)

0.2.2 (2015-01-22)

Bug Fixes

  • package: update dependencies (0f9bc51a)

0.2.1 (2015-01-12)

Bug Fixes

  • package: update Aurelia dependencies (770590c2)

0.2.0 (2015-01-06)

Bug Fixes

  • package: add es6-shim dependency for Object.assign (517b7e8e)

Features

  • build: update compiler and switch to register module format (ff2a572b)
  • history: enable usage as plugin (f73c967b)

0.1.1 (2014-12-17)

Bug Fixes

  • package: update dependencies to latest (cdd1c232)

0.1.0 (2014-12-11)

Bug Fixes

  • history: fix incorrect falsey check in getFragment (34cb8224)