Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(common): add historyGo method to Location service #38890

Closed

Commits on Apr 2, 2021

  1. feat(common): add historyGo method to Location service

    Add new method `historyGo`, that will let
    the user navigate to a specific page from session history identified by its
    relative position to the current page.
    
    We add some tests to `location_spec.ts` to validate the behavior of the
    `historyGo` and `forward` methods.
    
    Add more tests for `location_spec` to test `location.historyGo(0)`, `location.historyGo()`,
    `location.historyGo(100)` and `location.historyGo(-100)`. We also add new tests for
    `Integration` spec to validate the navigation when we using
    `location#historyGo`.
    
    Update the `historyGo` function docs
    
    Note that this was made an optional function in the abstract classes to
    avoid a breaking change. Because our location classes use `implements PlatformLocation`
    rather than `extends PlatformLocation`, simply adding a default
    implementation was not sufficient to make this a non-breaking change.
    While we could fix the classes internal to Angular, this would still have been
    a breaking change for any external developers who may have followed our
    implementations as an example.
    aahmedayed authored and atscott committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    dae6f19 View commit details
    Browse the repository at this point in the history