@angular/router 21.2.0-next.0 → 21.2.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.0-next.0
2
+ * @license Angular v21.2.0-next.2
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -171,9 +171,24 @@ const paramCompareMap = {
171
171
  'subset': containsParams,
172
172
  'ignored': () => true
173
173
  };
174
+ const exactMatchOptions = {
175
+ paths: 'exact',
176
+ fragment: 'ignored',
177
+ matrixParams: 'ignored',
178
+ queryParams: 'exact'
179
+ };
180
+ const subsetMatchOptions = {
181
+ paths: 'subset',
182
+ fragment: 'ignored',
183
+ matrixParams: 'ignored',
184
+ queryParams: 'subset'
185
+ };
174
186
  function isActive(url, router, matchOptions) {
175
187
  const urlTree = url instanceof UrlTree ? url : router.parseUrl(url);
176
- return computed(() => containsTree(router.lastSuccessfulNavigation()?.finalUrl ?? new UrlTree(), urlTree, matchOptions));
188
+ return computed(() => containsTree(router.lastSuccessfulNavigation()?.finalUrl ?? new UrlTree(), urlTree, {
189
+ ...subsetMatchOptions,
190
+ ...matchOptions
191
+ }));
177
192
  }
178
193
  function containsTree(container, containee, options) {
179
194
  return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) && paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) && !(options.fragment === 'exact' && container.fragment !== containee.fragment);
@@ -312,7 +327,7 @@ function mapChildrenIntoArray(segment, fn) {
312
327
  class UrlSerializer {
313
328
  static ɵfac = i0.ɵɵngDeclareFactory({
314
329
  minVersion: "12.0.0",
315
- version: "21.2.0-next.0",
330
+ version: "21.2.0-next.2",
316
331
  ngImport: i0,
317
332
  type: UrlSerializer,
318
333
  deps: [],
@@ -320,7 +335,7 @@ class UrlSerializer {
320
335
  });
321
336
  static ɵprov = i0.ɵɵngDeclareInjectable({
322
337
  minVersion: "12.0.0",
323
- version: "21.2.0-next.0",
338
+ version: "21.2.0-next.2",
324
339
  ngImport: i0,
325
340
  type: UrlSerializer,
326
341
  providedIn: 'root',
@@ -329,7 +344,7 @@ class UrlSerializer {
329
344
  }
330
345
  i0.ɵɵngDeclareClassMetadata({
331
346
  minVersion: "12.0.0",
332
- version: "21.2.0-next.0",
347
+ version: "21.2.0-next.2",
333
348
  ngImport: i0,
334
349
  type: UrlSerializer,
335
350
  decorators: [{
@@ -458,7 +473,10 @@ class UrlParser {
458
473
  parseFragment() {
459
474
  return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;
460
475
  }
461
- parseChildren() {
476
+ parseChildren(depth = 0) {
477
+ if (depth > 50) {
478
+ throw new _RuntimeError(4010, (typeof ngDevMode === 'undefined' || ngDevMode) && 'URL is too deep');
479
+ }
462
480
  if (this.remaining === '') {
463
481
  return {};
464
482
  }
@@ -474,11 +492,11 @@ class UrlParser {
474
492
  let children = {};
475
493
  if (this.peekStartsWith('/(')) {
476
494
  this.capture('/');
477
- children = this.parseParens(true);
495
+ children = this.parseParens(true, depth);
478
496
  }
479
497
  let res = {};
480
498
  if (this.peekStartsWith('(')) {
481
- res = this.parseParens(false);
499
+ res = this.parseParens(false, depth);
482
500
  }
483
501
  if (segments.length > 0 || Object.keys(children).length > 0) {
484
502
  res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);
@@ -543,7 +561,7 @@ class UrlParser {
543
561
  params[decodedKey] = decodedVal;
544
562
  }
545
563
  }
546
- parseParens(allowPrimary) {
564
+ parseParens(allowPrimary, depth) {
547
565
  const segments = {};
548
566
  this.capture('(');
549
567
  while (!this.consumeOptional(')') && this.remaining.length > 0) {
@@ -560,7 +578,7 @@ class UrlParser {
560
578
  } else if (allowPrimary) {
561
579
  outletName = PRIMARY_OUTLET;
562
580
  }
563
- const children = this.parseChildren();
581
+ const children = this.parseChildren(depth + 1);
564
582
  segments[outletName ?? PRIMARY_OUTLET] = Object.keys(children).length === 1 && children[PRIMARY_OUTLET] ? children[PRIMARY_OUTLET] : new UrlSegmentGroup([], children);
565
583
  this.consumeOptional('//');
566
584
  }
@@ -1283,7 +1301,7 @@ class ChildrenOutletContexts {
1283
1301
  }
1284
1302
  static ɵfac = i0.ɵɵngDeclareFactory({
1285
1303
  minVersion: "12.0.0",
1286
- version: "21.2.0-next.0",
1304
+ version: "21.2.0-next.2",
1287
1305
  ngImport: i0,
1288
1306
  type: ChildrenOutletContexts,
1289
1307
  deps: [{
@@ -1293,7 +1311,7 @@ class ChildrenOutletContexts {
1293
1311
  });
1294
1312
  static ɵprov = i0.ɵɵngDeclareInjectable({
1295
1313
  minVersion: "12.0.0",
1296
- version: "21.2.0-next.0",
1314
+ version: "21.2.0-next.2",
1297
1315
  ngImport: i0,
1298
1316
  type: ChildrenOutletContexts,
1299
1317
  providedIn: 'root'
@@ -1301,7 +1319,7 @@ class ChildrenOutletContexts {
1301
1319
  }
1302
1320
  i0.ɵɵngDeclareClassMetadata({
1303
1321
  minVersion: "12.0.0",
1304
- version: "21.2.0-next.0",
1322
+ version: "21.2.0-next.2",
1305
1323
  ngImport: i0,
1306
1324
  type: ChildrenOutletContexts,
1307
1325
  decorators: [{
@@ -1758,7 +1776,7 @@ class RouterOutlet {
1758
1776
  }
1759
1777
  static ɵfac = i0.ɵɵngDeclareFactory({
1760
1778
  minVersion: "12.0.0",
1761
- version: "21.2.0-next.0",
1779
+ version: "21.2.0-next.2",
1762
1780
  ngImport: i0,
1763
1781
  type: RouterOutlet,
1764
1782
  deps: [],
@@ -1766,7 +1784,7 @@ class RouterOutlet {
1766
1784
  });
1767
1785
  static ɵdir = i0.ɵɵngDeclareDirective({
1768
1786
  minVersion: "17.1.0",
1769
- version: "21.2.0-next.0",
1787
+ version: "21.2.0-next.2",
1770
1788
  type: RouterOutlet,
1771
1789
  isStandalone: true,
1772
1790
  selector: "router-outlet",
@@ -1799,7 +1817,7 @@ class RouterOutlet {
1799
1817
  }
1800
1818
  i0.ɵɵngDeclareClassMetadata({
1801
1819
  minVersion: "12.0.0",
1802
- version: "21.2.0-next.0",
1820
+ version: "21.2.0-next.2",
1803
1821
  ngImport: i0,
1804
1822
  type: RouterOutlet,
1805
1823
  decorators: [{
@@ -1908,7 +1926,7 @@ class RoutedComponentInputBinder {
1908
1926
  }
1909
1927
  static ɵfac = i0.ɵɵngDeclareFactory({
1910
1928
  minVersion: "12.0.0",
1911
- version: "21.2.0-next.0",
1929
+ version: "21.2.0-next.2",
1912
1930
  ngImport: i0,
1913
1931
  type: RoutedComponentInputBinder,
1914
1932
  deps: [],
@@ -1916,14 +1934,14 @@ class RoutedComponentInputBinder {
1916
1934
  });
1917
1935
  static ɵprov = i0.ɵɵngDeclareInjectable({
1918
1936
  minVersion: "12.0.0",
1919
- version: "21.2.0-next.0",
1937
+ version: "21.2.0-next.2",
1920
1938
  ngImport: i0,
1921
1939
  type: RoutedComponentInputBinder
1922
1940
  });
1923
1941
  }
1924
1942
  i0.ɵɵngDeclareClassMetadata({
1925
1943
  minVersion: "12.0.0",
1926
- version: "21.2.0-next.0",
1944
+ version: "21.2.0-next.2",
1927
1945
  ngImport: i0,
1928
1946
  type: RoutedComponentInputBinder,
1929
1947
  decorators: [{
@@ -1934,7 +1952,7 @@ i0.ɵɵngDeclareClassMetadata({
1934
1952
  class ɵEmptyOutletComponent {
1935
1953
  static ɵfac = i0.ɵɵngDeclareFactory({
1936
1954
  minVersion: "12.0.0",
1937
- version: "21.2.0-next.0",
1955
+ version: "21.2.0-next.2",
1938
1956
  ngImport: i0,
1939
1957
  type: ɵEmptyOutletComponent,
1940
1958
  deps: [],
@@ -1942,7 +1960,7 @@ class ɵEmptyOutletComponent {
1942
1960
  });
1943
1961
  static ɵcmp = i0.ɵɵngDeclareComponent({
1944
1962
  minVersion: "14.0.0",
1945
- version: "21.2.0-next.0",
1963
+ version: "21.2.0-next.2",
1946
1964
  type: ɵEmptyOutletComponent,
1947
1965
  isStandalone: true,
1948
1966
  selector: "ng-component",
@@ -1962,7 +1980,7 @@ class ɵEmptyOutletComponent {
1962
1980
  }
1963
1981
  i0.ɵɵngDeclareClassMetadata({
1964
1982
  minVersion: "12.0.0",
1965
- version: "21.2.0-next.0",
1983
+ version: "21.2.0-next.2",
1966
1984
  ngImport: i0,
1967
1985
  type: ɵEmptyOutletComponent,
1968
1986
  decorators: [{
@@ -2509,12 +2527,12 @@ function redirectIfUrlTree(urlSerializer) {
2509
2527
  throw redirectingNavigationError(urlSerializer, result);
2510
2528
  }), map(result => result === true));
2511
2529
  }
2512
- function runCanMatchGuards(injector, route, segments, urlSerializer, abortSignal) {
2530
+ function runCanMatchGuards(injector, route, segments, urlSerializer, currentSnapshot, abortSignal) {
2513
2531
  const canMatch = route.canMatch;
2514
2532
  if (!canMatch || canMatch.length === 0) return of(true);
2515
2533
  const canMatchObservables = canMatch.map(injectionToken => {
2516
2534
  const guard = getTokenOrFunctionIdentity(injectionToken, injector);
2517
- const guardVal = isCanMatch(guard) ? guard.canMatch(route, segments) : runInInjectionContext(injector, () => guard(route, segments));
2535
+ const guardVal = isCanMatch(guard) ? guard.canMatch(route, segments, currentSnapshot) : runInInjectionContext(injector, () => guard(route, segments, currentSnapshot));
2518
2536
  return wrapIntoObservable(guardVal).pipe(takeUntilAbort(abortSignal));
2519
2537
  });
2520
2538
  return of(canMatchObservables).pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));
@@ -2624,30 +2642,7 @@ function getRedirectResult(redirectTo, currentSnapshot, injector) {
2624
2642
  return Promise.resolve(redirectTo);
2625
2643
  }
2626
2644
  const redirectToFn = redirectTo;
2627
- const {
2628
- queryParams,
2629
- fragment,
2630
- routeConfig,
2631
- url,
2632
- outlet,
2633
- params,
2634
- data,
2635
- title,
2636
- paramMap,
2637
- queryParamMap
2638
- } = currentSnapshot;
2639
- return firstValueFrom(wrapIntoObservable(runInInjectionContext(injector, () => redirectToFn({
2640
- params,
2641
- data,
2642
- queryParams,
2643
- fragment,
2644
- routeConfig,
2645
- url,
2646
- outlet,
2647
- title,
2648
- paramMap,
2649
- queryParamMap
2650
- }))));
2645
+ return firstValueFrom(wrapIntoObservable(runInInjectionContext(injector, () => redirectToFn(currentSnapshot))));
2651
2646
  }
2652
2647
 
2653
2648
  function getOrCreateRouteInjectorIfNeeded(route, currentInjector) {
@@ -2765,13 +2760,28 @@ const noMatch = {
2765
2760
  parameters: {},
2766
2761
  positionalParamSegments: {}
2767
2762
  };
2768
- function matchWithChecks(segmentGroup, route, segments, injector, urlSerializer, abortSignal) {
2763
+ function createPreMatchRouteSnapshot(snapshot) {
2764
+ return {
2765
+ routeConfig: snapshot.routeConfig,
2766
+ url: snapshot.url,
2767
+ params: snapshot.params,
2768
+ queryParams: snapshot.queryParams,
2769
+ fragment: snapshot.fragment,
2770
+ data: snapshot.data,
2771
+ outlet: snapshot.outlet,
2772
+ title: snapshot.title,
2773
+ paramMap: snapshot.paramMap,
2774
+ queryParamMap: snapshot.queryParamMap
2775
+ };
2776
+ }
2777
+ function matchWithChecks(segmentGroup, route, segments, injector, urlSerializer, createSnapshot, abortSignal) {
2769
2778
  const result = match(segmentGroup, route, segments);
2770
2779
  if (!result.matched) {
2771
2780
  return of(result);
2772
2781
  }
2782
+ const currentSnapshot = createPreMatchRouteSnapshot(createSnapshot(result));
2773
2783
  injector = getOrCreateRouteInjectorIfNeeded(route, injector);
2774
- return runCanMatchGuards(injector, route, segments, urlSerializer, abortSignal).pipe(map(v => v === true ? result : {
2784
+ return runCanMatchGuards(injector, route, segments, urlSerializer, currentSnapshot, abortSignal).pipe(map(v => v === true ? result : {
2775
2785
  ...noMatch
2776
2786
  }));
2777
2787
  }
@@ -3016,24 +3026,29 @@ class Recognizer {
3016
3026
  this.allowRedirects = false;
3017
3027
  }
3018
3028
  }
3019
- const currentSnapshot = new ActivatedRouteSnapshot(segments, parameters, Object.freeze({
3020
- ...this.urlTree.queryParams
3021
- }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getResolve(route), injector);
3022
- const inherited = getInherited(currentSnapshot, parentRoute, this.paramsInheritanceStrategy);
3023
- currentSnapshot.params = Object.freeze(inherited.params);
3024
- currentSnapshot.data = Object.freeze(inherited.data);
3029
+ const currentSnapshot = this.createSnapshot(injector, route, segments, parameters, parentRoute);
3025
3030
  if (this.abortSignal.aborted) {
3026
3031
  throw new Error(this.abortSignal.reason);
3027
3032
  }
3028
- const newTree = await this.applyRedirects.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments, currentSnapshot, injector);
3033
+ const newTree = await this.applyRedirects.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments, createPreMatchRouteSnapshot(currentSnapshot), injector);
3029
3034
  const newSegments = await this.applyRedirects.lineralizeSegments(route, newTree);
3030
3035
  return this.processSegment(injector, routes, segmentGroup, newSegments.concat(remainingSegments), outlet, false, parentRoute);
3031
3036
  }
3037
+ createSnapshot(injector, route, segments, parameters, parentRoute) {
3038
+ const snapshot = new ActivatedRouteSnapshot(segments, parameters, Object.freeze({
3039
+ ...this.urlTree.queryParams
3040
+ }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getResolve(route), injector);
3041
+ const inherited = getInherited(snapshot, parentRoute, this.paramsInheritanceStrategy);
3042
+ snapshot.params = Object.freeze(inherited.params);
3043
+ snapshot.data = Object.freeze(inherited.data);
3044
+ return snapshot;
3045
+ }
3032
3046
  async matchSegmentAgainstRoute(injector, rawSegment, route, segments, outlet, parentRoute) {
3033
3047
  if (this.abortSignal.aborted) {
3034
3048
  throw new Error(this.abortSignal.reason);
3035
3049
  }
3036
- const result = await firstValueFrom(matchWithChecks(rawSegment, route, segments, injector, this.urlSerializer, this.abortSignal));
3050
+ const createSnapshot = result => this.createSnapshot(injector, route, result.consumedSegments, result.parameters, parentRoute);
3051
+ const result = await firstValueFrom(matchWithChecks(rawSegment, route, segments, injector, this.urlSerializer, createSnapshot, this.abortSignal));
3037
3052
  if (route.path === '**') {
3038
3053
  rawSegment.children = {};
3039
3054
  }
@@ -3050,12 +3065,7 @@ class Recognizer {
3050
3065
  consumedSegments,
3051
3066
  remainingSegments
3052
3067
  } = result;
3053
- const snapshot = new ActivatedRouteSnapshot(consumedSegments, parameters, Object.freeze({
3054
- ...this.urlTree.queryParams
3055
- }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getResolve(route), injector);
3056
- const inherited = getInherited(snapshot, parentRoute, this.paramsInheritanceStrategy);
3057
- snapshot.params = Object.freeze(inherited.params);
3058
- snapshot.data = Object.freeze(inherited.data);
3068
+ const snapshot = this.createSnapshot(injector, route, consumedSegments, parameters, parentRoute);
3059
3069
  const {
3060
3070
  segmentGroup,
3061
3071
  slicedSegments
@@ -3273,7 +3283,7 @@ class TitleStrategy {
3273
3283
  }
3274
3284
  static ɵfac = i0.ɵɵngDeclareFactory({
3275
3285
  minVersion: "12.0.0",
3276
- version: "21.2.0-next.0",
3286
+ version: "21.2.0-next.2",
3277
3287
  ngImport: i0,
3278
3288
  type: TitleStrategy,
3279
3289
  deps: [],
@@ -3281,7 +3291,7 @@ class TitleStrategy {
3281
3291
  });
3282
3292
  static ɵprov = i0.ɵɵngDeclareInjectable({
3283
3293
  minVersion: "12.0.0",
3284
- version: "21.2.0-next.0",
3294
+ version: "21.2.0-next.2",
3285
3295
  ngImport: i0,
3286
3296
  type: TitleStrategy,
3287
3297
  providedIn: 'root',
@@ -3290,7 +3300,7 @@ class TitleStrategy {
3290
3300
  }
3291
3301
  i0.ɵɵngDeclareClassMetadata({
3292
3302
  minVersion: "12.0.0",
3293
- version: "21.2.0-next.0",
3303
+ version: "21.2.0-next.2",
3294
3304
  ngImport: i0,
3295
3305
  type: TitleStrategy,
3296
3306
  decorators: [{
@@ -3315,7 +3325,7 @@ class DefaultTitleStrategy extends TitleStrategy {
3315
3325
  }
3316
3326
  static ɵfac = i0.ɵɵngDeclareFactory({
3317
3327
  minVersion: "12.0.0",
3318
- version: "21.2.0-next.0",
3328
+ version: "21.2.0-next.2",
3319
3329
  ngImport: i0,
3320
3330
  type: DefaultTitleStrategy,
3321
3331
  deps: [{
@@ -3325,7 +3335,7 @@ class DefaultTitleStrategy extends TitleStrategy {
3325
3335
  });
3326
3336
  static ɵprov = i0.ɵɵngDeclareInjectable({
3327
3337
  minVersion: "12.0.0",
3328
- version: "21.2.0-next.0",
3338
+ version: "21.2.0-next.2",
3329
3339
  ngImport: i0,
3330
3340
  type: DefaultTitleStrategy,
3331
3341
  providedIn: 'root'
@@ -3333,7 +3343,7 @@ class DefaultTitleStrategy extends TitleStrategy {
3333
3343
  }
3334
3344
  i0.ɵɵngDeclareClassMetadata({
3335
3345
  minVersion: "12.0.0",
3336
- version: "21.2.0-next.0",
3346
+ version: "21.2.0-next.2",
3337
3347
  ngImport: i0,
3338
3348
  type: DefaultTitleStrategy,
3339
3349
  decorators: [{
@@ -3412,7 +3422,7 @@ class RouterConfigLoader {
3412
3422
  }
3413
3423
  static ɵfac = i0.ɵɵngDeclareFactory({
3414
3424
  minVersion: "12.0.0",
3415
- version: "21.2.0-next.0",
3425
+ version: "21.2.0-next.2",
3416
3426
  ngImport: i0,
3417
3427
  type: RouterConfigLoader,
3418
3428
  deps: [],
@@ -3420,7 +3430,7 @@ class RouterConfigLoader {
3420
3430
  });
3421
3431
  static ɵprov = i0.ɵɵngDeclareInjectable({
3422
3432
  minVersion: "12.0.0",
3423
- version: "21.2.0-next.0",
3433
+ version: "21.2.0-next.2",
3424
3434
  ngImport: i0,
3425
3435
  type: RouterConfigLoader,
3426
3436
  providedIn: 'root'
@@ -3428,7 +3438,7 @@ class RouterConfigLoader {
3428
3438
  }
3429
3439
  i0.ɵɵngDeclareClassMetadata({
3430
3440
  minVersion: "12.0.0",
3431
- version: "21.2.0-next.0",
3441
+ version: "21.2.0-next.2",
3432
3442
  ngImport: i0,
3433
3443
  type: RouterConfigLoader,
3434
3444
  decorators: [{
@@ -3493,7 +3503,7 @@ async function maybeResolveResources(value) {
3493
3503
  class UrlHandlingStrategy {
3494
3504
  static ɵfac = i0.ɵɵngDeclareFactory({
3495
3505
  minVersion: "12.0.0",
3496
- version: "21.2.0-next.0",
3506
+ version: "21.2.0-next.2",
3497
3507
  ngImport: i0,
3498
3508
  type: UrlHandlingStrategy,
3499
3509
  deps: [],
@@ -3501,7 +3511,7 @@ class UrlHandlingStrategy {
3501
3511
  });
3502
3512
  static ɵprov = i0.ɵɵngDeclareInjectable({
3503
3513
  minVersion: "12.0.0",
3504
- version: "21.2.0-next.0",
3514
+ version: "21.2.0-next.2",
3505
3515
  ngImport: i0,
3506
3516
  type: UrlHandlingStrategy,
3507
3517
  providedIn: 'root',
@@ -3510,7 +3520,7 @@ class UrlHandlingStrategy {
3510
3520
  }
3511
3521
  i0.ɵɵngDeclareClassMetadata({
3512
3522
  minVersion: "12.0.0",
3513
- version: "21.2.0-next.0",
3523
+ version: "21.2.0-next.2",
3514
3524
  ngImport: i0,
3515
3525
  type: UrlHandlingStrategy,
3516
3526
  decorators: [{
@@ -3533,7 +3543,7 @@ class DefaultUrlHandlingStrategy {
3533
3543
  }
3534
3544
  static ɵfac = i0.ɵɵngDeclareFactory({
3535
3545
  minVersion: "12.0.0",
3536
- version: "21.2.0-next.0",
3546
+ version: "21.2.0-next.2",
3537
3547
  ngImport: i0,
3538
3548
  type: DefaultUrlHandlingStrategy,
3539
3549
  deps: [],
@@ -3541,7 +3551,7 @@ class DefaultUrlHandlingStrategy {
3541
3551
  });
3542
3552
  static ɵprov = i0.ɵɵngDeclareInjectable({
3543
3553
  minVersion: "12.0.0",
3544
- version: "21.2.0-next.0",
3554
+ version: "21.2.0-next.2",
3545
3555
  ngImport: i0,
3546
3556
  type: DefaultUrlHandlingStrategy,
3547
3557
  providedIn: 'root'
@@ -3549,7 +3559,7 @@ class DefaultUrlHandlingStrategy {
3549
3559
  }
3550
3560
  i0.ɵɵngDeclareClassMetadata({
3551
3561
  minVersion: "12.0.0",
3552
- version: "21.2.0-next.0",
3562
+ version: "21.2.0-next.2",
3553
3563
  ngImport: i0,
3554
3564
  type: DefaultUrlHandlingStrategy,
3555
3565
  decorators: [{
@@ -3948,7 +3958,7 @@ class NavigationTransitions {
3948
3958
  }
3949
3959
  static ɵfac = i0.ɵɵngDeclareFactory({
3950
3960
  minVersion: "12.0.0",
3951
- version: "21.2.0-next.0",
3961
+ version: "21.2.0-next.2",
3952
3962
  ngImport: i0,
3953
3963
  type: NavigationTransitions,
3954
3964
  deps: [],
@@ -3956,7 +3966,7 @@ class NavigationTransitions {
3956
3966
  });
3957
3967
  static ɵprov = i0.ɵɵngDeclareInjectable({
3958
3968
  minVersion: "12.0.0",
3959
- version: "21.2.0-next.0",
3969
+ version: "21.2.0-next.2",
3960
3970
  ngImport: i0,
3961
3971
  type: NavigationTransitions,
3962
3972
  providedIn: 'root'
@@ -3964,7 +3974,7 @@ class NavigationTransitions {
3964
3974
  }
3965
3975
  i0.ɵɵngDeclareClassMetadata({
3966
3976
  minVersion: "12.0.0",
3967
- version: "21.2.0-next.0",
3977
+ version: "21.2.0-next.2",
3968
3978
  ngImport: i0,
3969
3979
  type: NavigationTransitions,
3970
3980
  decorators: [{
@@ -4037,7 +4047,7 @@ function destroyDetachedRouteHandle(handle) {
4037
4047
  class RouteReuseStrategy {
4038
4048
  static ɵfac = i0.ɵɵngDeclareFactory({
4039
4049
  minVersion: "12.0.0",
4040
- version: "21.2.0-next.0",
4050
+ version: "21.2.0-next.2",
4041
4051
  ngImport: i0,
4042
4052
  type: RouteReuseStrategy,
4043
4053
  deps: [],
@@ -4045,7 +4055,7 @@ class RouteReuseStrategy {
4045
4055
  });
4046
4056
  static ɵprov = i0.ɵɵngDeclareInjectable({
4047
4057
  minVersion: "12.0.0",
4048
- version: "21.2.0-next.0",
4058
+ version: "21.2.0-next.2",
4049
4059
  ngImport: i0,
4050
4060
  type: RouteReuseStrategy,
4051
4061
  providedIn: 'root',
@@ -4054,7 +4064,7 @@ class RouteReuseStrategy {
4054
4064
  }
4055
4065
  i0.ɵɵngDeclareClassMetadata({
4056
4066
  minVersion: "12.0.0",
4057
- version: "21.2.0-next.0",
4067
+ version: "21.2.0-next.2",
4058
4068
  ngImport: i0,
4059
4069
  type: RouteReuseStrategy,
4060
4070
  decorators: [{
@@ -4086,7 +4096,7 @@ class BaseRouteReuseStrategy {
4086
4096
  class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
4087
4097
  static ɵfac = i0.ɵɵngDeclareFactory({
4088
4098
  minVersion: "12.0.0",
4089
- version: "21.2.0-next.0",
4099
+ version: "21.2.0-next.2",
4090
4100
  ngImport: i0,
4091
4101
  type: DefaultRouteReuseStrategy,
4092
4102
  deps: null,
@@ -4094,7 +4104,7 @@ class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
4094
4104
  });
4095
4105
  static ɵprov = i0.ɵɵngDeclareInjectable({
4096
4106
  minVersion: "12.0.0",
4097
- version: "21.2.0-next.0",
4107
+ version: "21.2.0-next.2",
4098
4108
  ngImport: i0,
4099
4109
  type: DefaultRouteReuseStrategy,
4100
4110
  providedIn: 'root'
@@ -4102,7 +4112,7 @@ class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
4102
4112
  }
4103
4113
  i0.ɵɵngDeclareClassMetadata({
4104
4114
  minVersion: "12.0.0",
4105
- version: "21.2.0-next.0",
4115
+ version: "21.2.0-next.2",
4106
4116
  ngImport: i0,
4107
4117
  type: DefaultRouteReuseStrategy,
4108
4118
  decorators: [{
@@ -4176,7 +4186,7 @@ class StateManager {
4176
4186
  }
4177
4187
  static ɵfac = i0.ɵɵngDeclareFactory({
4178
4188
  minVersion: "12.0.0",
4179
- version: "21.2.0-next.0",
4189
+ version: "21.2.0-next.2",
4180
4190
  ngImport: i0,
4181
4191
  type: StateManager,
4182
4192
  deps: [],
@@ -4184,7 +4194,7 @@ class StateManager {
4184
4194
  });
4185
4195
  static ɵprov = i0.ɵɵngDeclareInjectable({
4186
4196
  minVersion: "12.0.0",
4187
- version: "21.2.0-next.0",
4197
+ version: "21.2.0-next.2",
4188
4198
  ngImport: i0,
4189
4199
  type: StateManager,
4190
4200
  providedIn: 'root',
@@ -4193,7 +4203,7 @@ class StateManager {
4193
4203
  }
4194
4204
  i0.ɵɵngDeclareClassMetadata({
4195
4205
  minVersion: "12.0.0",
4196
- version: "21.2.0-next.0",
4206
+ version: "21.2.0-next.2",
4197
4207
  ngImport: i0,
4198
4208
  type: StateManager,
4199
4209
  decorators: [{
@@ -4312,7 +4322,7 @@ class HistoryStateManager extends StateManager {
4312
4322
  }
4313
4323
  static ɵfac = i0.ɵɵngDeclareFactory({
4314
4324
  minVersion: "12.0.0",
4315
- version: "21.2.0-next.0",
4325
+ version: "21.2.0-next.2",
4316
4326
  ngImport: i0,
4317
4327
  type: HistoryStateManager,
4318
4328
  deps: null,
@@ -4320,7 +4330,7 @@ class HistoryStateManager extends StateManager {
4320
4330
  });
4321
4331
  static ɵprov = i0.ɵɵngDeclareInjectable({
4322
4332
  minVersion: "12.0.0",
4323
- version: "21.2.0-next.0",
4333
+ version: "21.2.0-next.2",
4324
4334
  ngImport: i0,
4325
4335
  type: HistoryStateManager,
4326
4336
  providedIn: 'root'
@@ -4328,7 +4338,7 @@ class HistoryStateManager extends StateManager {
4328
4338
  }
4329
4339
  i0.ɵɵngDeclareClassMetadata({
4330
4340
  minVersion: "12.0.0",
4331
- version: "21.2.0-next.0",
4341
+ version: "21.2.0-next.2",
4332
4342
  ngImport: i0,
4333
4343
  type: HistoryStateManager,
4334
4344
  decorators: [{
@@ -4351,18 +4361,6 @@ function afterNextNavigation(router, action) {
4351
4361
  });
4352
4362
  }
4353
4363
 
4354
- const exactMatchOptions = {
4355
- paths: 'exact',
4356
- fragment: 'ignored',
4357
- matrixParams: 'ignored',
4358
- queryParams: 'exact'
4359
- };
4360
- const subsetMatchOptions = {
4361
- paths: 'subset',
4362
- fragment: 'ignored',
4363
- matrixParams: 'ignored',
4364
- queryParams: 'subset'
4365
- };
4366
4364
  class Router {
4367
4365
  get currentUrlTree() {
4368
4366
  return this.stateManager.getCurrentUrlTree();
@@ -4586,7 +4584,10 @@ class Router {
4586
4584
  ...subsetMatchOptions
4587
4585
  };
4588
4586
  } else {
4589
- options = matchOptions;
4587
+ options = {
4588
+ ...subsetMatchOptions,
4589
+ ...matchOptions
4590
+ };
4590
4591
  }
4591
4592
  if (isUrlTree(url)) {
4592
4593
  return containsTree(this.currentUrlTree, url, options);
@@ -4636,13 +4637,11 @@ class Router {
4636
4637
  currentSnapshot: this.routerState.snapshot,
4637
4638
  currentRouterState: this.routerState
4638
4639
  });
4639
- return promise.catch(e => {
4640
- return Promise.reject(e);
4641
- });
4640
+ return promise.catch(Promise.reject.bind(Promise));
4642
4641
  }
4643
4642
  static ɵfac = i0.ɵɵngDeclareFactory({
4644
4643
  minVersion: "12.0.0",
4645
- version: "21.2.0-next.0",
4644
+ version: "21.2.0-next.2",
4646
4645
  ngImport: i0,
4647
4646
  type: Router,
4648
4647
  deps: [],
@@ -4650,7 +4649,7 @@ class Router {
4650
4649
  });
4651
4650
  static ɵprov = i0.ɵɵngDeclareInjectable({
4652
4651
  minVersion: "12.0.0",
4653
- version: "21.2.0-next.0",
4652
+ version: "21.2.0-next.2",
4654
4653
  ngImport: i0,
4655
4654
  type: Router,
4656
4655
  providedIn: 'root'
@@ -4658,7 +4657,7 @@ class Router {
4658
4657
  }
4659
4658
  i0.ɵɵngDeclareClassMetadata({
4660
4659
  minVersion: "12.0.0",
4661
- version: "21.2.0-next.0",
4660
+ version: "21.2.0-next.2",
4662
4661
  ngImport: i0,
4663
4662
  type: Router,
4664
4663
  decorators: [{