angular/packages
Andrew Scott 31f210bf2c fix(router): Router.createUrlTree should work with any ActivatedRoute (#48508)
This change makes the `createUrlTreeFromSnapshot` added in #45877 the
default and only behavior in the Router. This now addreses #42191, #38276, #22763,
and #48472 without needing to create custom handling to
call `createUrlTreeFromSnapshot` (since it's now called by `Router.createUrlTree`).

BREAKING CHANGE: Tests which mock `ActivatedRoute` instances may need to be adjusted
because Router.createUrlTree now does the right thing in more
scenarios. This means that tests with invalid/incomplete ActivatedRoute mocks
may behave differently than before. Additionally, tests may now navigate
to a real URL where before they would navigate to the root. Ensure that
tests provide expected routes to match.
There is rarely production impact, but it has been found that relative
navigations when using an `ActivatedRoute` that does not appear in the
current router state were effectively ignored in the past. By creating
the correct URLs, this sometimes resulted in different navigation
behavior in the application. Most often, this happens when attempting to
create a navigation that only updates query params using an empty
command array, for example `router.navigate([], {relativeTo: route,
queryParams: newQueryParams})`. In this case, the `relativeTo` property
should be removed.

PR Close #48508
2023-02-28 08:21:20 -08:00
..
animations fix(animations): fix non-animatable warnings for easing (#48583) 2023-01-26 22:03:07 +00:00
bazel feat(compiler): drop support for TypeScript 4.8 (#49155) 2023-02-23 10:39:43 -08:00
benchpress build: ensure bootstrap transitive runfiles are made available (#48521) 2022-12-19 19:50:41 +00:00
common refactor(common): Use isPromise from @angular/core (#49210) 2023-02-27 10:03:20 -08:00
compiler refactor(compiler): Remove strictStyling option for ShadowCss (#48824) 2023-02-02 13:38:38 -08:00
compiler-cli fix(compiler-cli): do not persist component analysis if template/styles are missing (#49184) 2023-02-24 08:24:07 -08:00
core fix(router): Router.createUrlTree should work with any ActivatedRoute (#48508) 2023-02-28 08:21:20 -08:00
docs docs: fix packages\docs\di\di.md (#46704) 2022-07-08 17:53:39 +00:00
elements refactor(elements): handle #24571 todos (#49233) 2023-02-28 08:19:56 -08:00
examples docs: remove TODO from doc example (#49233) 2023-02-28 08:19:56 -08:00
forms fix(forms): Make radio buttons respect [attr.disabled] (#48864) 2023-02-10 11:25:11 +01:00
language-service refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
localize refactor(localize): bundle message digest algorithm directly in npm package (#48799) 2023-01-24 18:31:25 +00:00
misc/angular-in-memory-web-api build: update angular-in-memory-web-api to work with ESM (#48521) 2022-12-19 19:50:42 +00:00
platform-browser refactor(platform-browser): rename transfer_state.ts -> transfer_state_module.ts (#49222) 2023-02-27 13:08:40 -08:00
platform-browser-dynamic refactor: update platform-browser-dynamic to work with ESM output (#48521) 2022-12-19 19:50:43 +00:00
platform-server refactor(platform-server): handle #24571 todos (#49233) 2023-02-28 08:19:56 -08:00
private/testing build: bundle tests for karma web test suites (#48521) 2022-12-19 19:50:42 +00:00
router fix(router): Router.createUrlTree should work with any ActivatedRoute (#48508) 2023-02-28 08:21:20 -08:00
service-worker refactor(service-worker): removing some todos (#48707) 2023-01-24 16:40:23 +00:00
upgrade refactor(upgrade): rewrite the downgrade component adapter (#48715) 2023-01-25 18:32:05 +00:00
zone.js fix(zone.js): zone-node only patch Promise.prototype.then (#49144) 2023-02-27 08:02:43 -08:00
BUILD.bazel build(bazel): list docs entrypoints under packages to simplify docgen 2022-11-22 13:51:16 -07:00
circular-deps-test.conf.js build: ignore type only imports/exports for circular dependency checks (#47017) 2022-08-18 12:06:09 -07:00
empty.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts refactor(core): replace references to goog.LOCALE with goog.getLocale() (#43089) 2021-08-10 10:35:26 -07:00
license-banner.txt build: bump license year (#44590) 2022-01-04 12:05:25 -08:00
README.md
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build.json refactor: adjust packages/core/test to work with ESM (#48521) 2022-12-19 19:50:42 +00:00
tsconfig-legacy-saucelabs.json refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
tsconfig-test.json build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
tsconfig-tsec-base.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00
tsconfig.json refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
tsec-exemption.json fix(core): hardening attribute and property binding rules for <iframe> elements (#47964) 2022-11-09 00:47:56 -08:00
types.d.ts build: update to jasmine 4.0 (#45558) 2022-04-11 16:25:28 +00:00

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT