angular-docs-cn/goldens/public-api
Ahmed Ayed e05a6f3bb3 feat(common): add `historyGo` method to `Location` service (#38890)
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.

PR Close #38890
2021-04-06 09:25:58 -07:00
..
animations ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
common feat(common): add `historyGo` method to `Location` service (#38890) 2021-04-06 09:25:58 -07:00
compiler-cli fix(language-service): show suggestion when type inference is suboptimal (#41072) 2021-03-23 09:39:19 -07:00
core refactor(core): remove the need for `ɵɵinjectPipeChangeDetectorRef()` (#41231) 2021-03-30 16:46:37 -07:00
elements feat(compiler-cli): add support for TypeScript 4.0 (#38076) 2020-08-24 13:06:59 -07:00
forms perf(forms): make `RadioControlRegistry` class tree-shakable (#41126) 2021-03-16 09:35:14 -07:00
localize ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-browser feat(animations): add support for disabling animations through BrowserAnimationsModule.withConfig (#40731) 2021-02-24 15:08:27 -08:00
platform-browser-dynamic ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-server feat(platform-server): allow shimming the global env sooner (#40559) 2021-02-12 08:55:25 -08:00
platform-webworker ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-webworker-dynamic ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
router fix(router): fragment can be null (#37336) 2021-03-22 10:02:39 -07:00
service-worker feat(service-worker): add the option to prefer network for navigation requests (#38565) 2020-09-22 09:29:20 -07:00
upgrade fix(upgrade): fix HMR for hybrid applications (#40045) 2020-12-10 13:40:53 -08:00
manage.js ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00