angular-cn/packages/common/test
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
..
directives fix(common): avoid mutating context object in NgTemplateOutlet (#40360) 2021-02-23 08:14:02 -08:00
i18n feat(common): support ICU standard "stand alone day of week" with `DatePipe` (#40766) 2021-02-10 16:03:06 -08:00
location feat(common): add `historyGo` method to `Location` service (#38890) 2021-04-06 09:25:58 -07:00
pipes fix(core): ensure the type `T` of `EventEmitter<T>` can be inferred (#40644) 2021-02-03 09:07:29 -08:00
BUILD.bazel feat(common): allow any Subscribable in async pipe (#39627) 2020-11-23 08:28:11 -08:00
cookie_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
spies.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
viewport_scroller_spec.ts test(router): update scroller tests to use real objects (#40241) 2021-01-05 09:48:48 -08:00