@angular/router 21.1.4 → 21.1.6
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.
- package/fesm2022/_router-chunk.mjs +49 -49
- package/fesm2022/_router-chunk.mjs.map +1 -1
- package/fesm2022/_router_module-chunk.mjs +26 -26
- package/fesm2022/router.mjs +2 -2
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/testing.mjs +11 -11
- package/fesm2022/upgrade.mjs +1 -1
- package/package.json +4 -4
- package/types/_router_module-chunk.d.ts +97 -86
- package/types/router.d.ts +1 -1
- package/types/testing.d.ts +1 -1
- package/types/upgrade.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.1.
|
|
2
|
+
* @license Angular v21.1.6
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -9,83 +9,6 @@ import { InjectionToken, Signal, EnvironmentInjector, ComponentRef, EventEmitter
|
|
|
9
9
|
import { Observable } from 'rxjs';
|
|
10
10
|
import { LocationStrategy } from '@angular/common';
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* The primary routing outlet.
|
|
14
|
-
*
|
|
15
|
-
* @publicApi
|
|
16
|
-
*/
|
|
17
|
-
declare const PRIMARY_OUTLET = "primary";
|
|
18
|
-
/**
|
|
19
|
-
* A collection of matrix and query URL parameters.
|
|
20
|
-
* @see {@link convertToParamMap}
|
|
21
|
-
* @see {@link ParamMap}
|
|
22
|
-
*
|
|
23
|
-
* @publicApi
|
|
24
|
-
*/
|
|
25
|
-
type Params = {
|
|
26
|
-
[key: string]: any;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* A map that provides access to the required and optional parameters
|
|
30
|
-
* specific to a route.
|
|
31
|
-
* The map supports retrieving a single value with `get()`
|
|
32
|
-
* or multiple values with `getAll()`.
|
|
33
|
-
*
|
|
34
|
-
* @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
|
|
35
|
-
*
|
|
36
|
-
* @publicApi
|
|
37
|
-
*/
|
|
38
|
-
interface ParamMap {
|
|
39
|
-
/**
|
|
40
|
-
* Reports whether the map contains a given parameter.
|
|
41
|
-
* @param name The parameter name.
|
|
42
|
-
* @returns True if the map contains the given parameter, false otherwise.
|
|
43
|
-
*/
|
|
44
|
-
has(name: string): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Retrieves a single value for a parameter.
|
|
47
|
-
* @param name The parameter name.
|
|
48
|
-
* @return The parameter's single value,
|
|
49
|
-
* or the first value if the parameter has multiple values,
|
|
50
|
-
* or `null` when there is no such parameter.
|
|
51
|
-
*/
|
|
52
|
-
get(name: string): string | null;
|
|
53
|
-
/**
|
|
54
|
-
* Retrieves multiple values for a parameter.
|
|
55
|
-
* @param name The parameter name.
|
|
56
|
-
* @return An array containing one or more values,
|
|
57
|
-
* or an empty array if there is no such parameter.
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
|
-
getAll(name: string): string[];
|
|
61
|
-
/** Names of the parameters in the map. */
|
|
62
|
-
readonly keys: string[];
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Converts a `Params` instance to a `ParamMap`.
|
|
66
|
-
* @param params The instance to convert.
|
|
67
|
-
* @returns The new map instance.
|
|
68
|
-
*
|
|
69
|
-
* @publicApi
|
|
70
|
-
*/
|
|
71
|
-
declare function convertToParamMap(params: Params): ParamMap;
|
|
72
|
-
/**
|
|
73
|
-
* Matches the route configuration (`route`) against the actual URL (`segments`).
|
|
74
|
-
*
|
|
75
|
-
* When no matcher is defined on a `Route`, this is the matcher used by the Router by default.
|
|
76
|
-
*
|
|
77
|
-
* @param segments The remaining unmatched segments in the current navigation
|
|
78
|
-
* @param segmentGroup The current segment group being matched
|
|
79
|
-
* @param route The `Route` to match against.
|
|
80
|
-
*
|
|
81
|
-
* @see {@link UrlMatchResult}
|
|
82
|
-
* @see {@link Route}
|
|
83
|
-
*
|
|
84
|
-
* @returns The resulting match information or `null` if the `route` should not match.
|
|
85
|
-
* @publicApi
|
|
86
|
-
*/
|
|
87
|
-
declare function defaultUrlMatcher(segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult | null;
|
|
88
|
-
|
|
89
12
|
/**
|
|
90
13
|
* Identifies the call or event that triggered a navigation.
|
|
91
14
|
*
|
|
@@ -206,7 +129,7 @@ declare class NavigationStart extends RouterEvent {
|
|
|
206
129
|
[k: string]: any;
|
|
207
130
|
navigationId: number;
|
|
208
131
|
} | null);
|
|
209
|
-
/** @
|
|
132
|
+
/** @docs-private */
|
|
210
133
|
toString(): string;
|
|
211
134
|
}
|
|
212
135
|
/**
|
|
@@ -229,7 +152,7 @@ declare class NavigationEnd extends RouterEvent {
|
|
|
229
152
|
url: string,
|
|
230
153
|
/** @docsNotRequired */
|
|
231
154
|
urlAfterRedirects: string);
|
|
232
|
-
/** @
|
|
155
|
+
/** @docs-private */
|
|
233
156
|
toString(): string;
|
|
234
157
|
}
|
|
235
158
|
/**
|
|
@@ -321,7 +244,7 @@ declare class NavigationCancel extends RouterEvent {
|
|
|
321
244
|
* used in production.
|
|
322
245
|
*/
|
|
323
246
|
code?: NavigationCancellationCode | undefined);
|
|
324
|
-
/** @
|
|
247
|
+
/** @docs-private */
|
|
325
248
|
toString(): string;
|
|
326
249
|
}
|
|
327
250
|
/**
|
|
@@ -396,7 +319,7 @@ declare class NavigationError extends RouterEvent {
|
|
|
396
319
|
* `RouterStateSnapshot` was created for the navigation.
|
|
397
320
|
*/
|
|
398
321
|
target?: RouterStateSnapshot | undefined);
|
|
399
|
-
/** @
|
|
322
|
+
/** @docs-private */
|
|
400
323
|
toString(): string;
|
|
401
324
|
}
|
|
402
325
|
/**
|
|
@@ -419,7 +342,7 @@ declare class RoutesRecognized extends RouterEvent {
|
|
|
419
342
|
urlAfterRedirects: string,
|
|
420
343
|
/** @docsNotRequired */
|
|
421
344
|
state: RouterStateSnapshot);
|
|
422
|
-
/** @
|
|
345
|
+
/** @docs-private */
|
|
423
346
|
toString(): string;
|
|
424
347
|
}
|
|
425
348
|
/**
|
|
@@ -444,6 +367,7 @@ declare class GuardsCheckStart extends RouterEvent {
|
|
|
444
367
|
urlAfterRedirects: string,
|
|
445
368
|
/** @docsNotRequired */
|
|
446
369
|
state: RouterStateSnapshot);
|
|
370
|
+
/** @docs-private */
|
|
447
371
|
toString(): string;
|
|
448
372
|
}
|
|
449
373
|
/**
|
|
@@ -472,6 +396,7 @@ declare class GuardsCheckEnd extends RouterEvent {
|
|
|
472
396
|
state: RouterStateSnapshot,
|
|
473
397
|
/** @docsNotRequired */
|
|
474
398
|
shouldActivate: boolean);
|
|
399
|
+
/** @docs-private */
|
|
475
400
|
toString(): string;
|
|
476
401
|
}
|
|
477
402
|
/**
|
|
@@ -499,6 +424,7 @@ declare class ResolveStart extends RouterEvent {
|
|
|
499
424
|
urlAfterRedirects: string,
|
|
500
425
|
/** @docsNotRequired */
|
|
501
426
|
state: RouterStateSnapshot);
|
|
427
|
+
/** @docs-private */
|
|
502
428
|
toString(): string;
|
|
503
429
|
}
|
|
504
430
|
/**
|
|
@@ -522,6 +448,7 @@ declare class ResolveEnd extends RouterEvent {
|
|
|
522
448
|
urlAfterRedirects: string,
|
|
523
449
|
/** @docsNotRequired */
|
|
524
450
|
state: RouterStateSnapshot);
|
|
451
|
+
/** @docs-private */
|
|
525
452
|
toString(): string;
|
|
526
453
|
}
|
|
527
454
|
/**
|
|
@@ -538,6 +465,7 @@ declare class RouteConfigLoadStart {
|
|
|
538
465
|
constructor(
|
|
539
466
|
/** @docsNotRequired */
|
|
540
467
|
route: Route);
|
|
468
|
+
/** @docs-private */
|
|
541
469
|
toString(): string;
|
|
542
470
|
}
|
|
543
471
|
/**
|
|
@@ -554,6 +482,7 @@ declare class RouteConfigLoadEnd {
|
|
|
554
482
|
constructor(
|
|
555
483
|
/** @docsNotRequired */
|
|
556
484
|
route: Route);
|
|
485
|
+
/** @docs-private */
|
|
557
486
|
toString(): string;
|
|
558
487
|
}
|
|
559
488
|
/**
|
|
@@ -571,6 +500,7 @@ declare class ChildActivationStart {
|
|
|
571
500
|
constructor(
|
|
572
501
|
/** @docsNotRequired */
|
|
573
502
|
snapshot: ActivatedRouteSnapshot);
|
|
503
|
+
/** @docs-private */
|
|
574
504
|
toString(): string;
|
|
575
505
|
}
|
|
576
506
|
/**
|
|
@@ -587,6 +517,7 @@ declare class ChildActivationEnd {
|
|
|
587
517
|
constructor(
|
|
588
518
|
/** @docsNotRequired */
|
|
589
519
|
snapshot: ActivatedRouteSnapshot);
|
|
520
|
+
/** @docs-private */
|
|
590
521
|
toString(): string;
|
|
591
522
|
}
|
|
592
523
|
/**
|
|
@@ -604,6 +535,7 @@ declare class ActivationStart {
|
|
|
604
535
|
constructor(
|
|
605
536
|
/** @docsNotRequired */
|
|
606
537
|
snapshot: ActivatedRouteSnapshot);
|
|
538
|
+
/** @docs-private */
|
|
607
539
|
toString(): string;
|
|
608
540
|
}
|
|
609
541
|
/**
|
|
@@ -621,6 +553,7 @@ declare class ActivationEnd {
|
|
|
621
553
|
constructor(
|
|
622
554
|
/** @docsNotRequired */
|
|
623
555
|
snapshot: ActivatedRouteSnapshot);
|
|
556
|
+
/** @docs-private */
|
|
624
557
|
toString(): string;
|
|
625
558
|
}
|
|
626
559
|
/**
|
|
@@ -647,6 +580,7 @@ declare class Scroll {
|
|
|
647
580
|
anchor: string | null,
|
|
648
581
|
/** @docsNotRequired */
|
|
649
582
|
scrollBehavior?: "manual" | "after-transition" | undefined);
|
|
583
|
+
/** @docs-private */
|
|
650
584
|
toString(): string;
|
|
651
585
|
}
|
|
652
586
|
/**
|
|
@@ -684,6 +618,83 @@ declare class Scroll {
|
|
|
684
618
|
*/
|
|
685
619
|
type Event = NavigationStart | NavigationEnd | NavigationCancel | NavigationError | RoutesRecognized | GuardsCheckStart | GuardsCheckEnd | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll | ResolveStart | ResolveEnd | NavigationSkipped;
|
|
686
620
|
|
|
621
|
+
/**
|
|
622
|
+
* The primary routing outlet.
|
|
623
|
+
*
|
|
624
|
+
* @publicApi
|
|
625
|
+
*/
|
|
626
|
+
declare const PRIMARY_OUTLET = "primary";
|
|
627
|
+
/**
|
|
628
|
+
* A collection of matrix and query URL parameters.
|
|
629
|
+
* @see {@link convertToParamMap}
|
|
630
|
+
* @see {@link ParamMap}
|
|
631
|
+
*
|
|
632
|
+
* @publicApi
|
|
633
|
+
*/
|
|
634
|
+
type Params = {
|
|
635
|
+
[key: string]: any;
|
|
636
|
+
};
|
|
637
|
+
/**
|
|
638
|
+
* A map that provides access to the required and optional parameters
|
|
639
|
+
* specific to a route.
|
|
640
|
+
* The map supports retrieving a single value with `get()`
|
|
641
|
+
* or multiple values with `getAll()`.
|
|
642
|
+
*
|
|
643
|
+
* @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
|
|
644
|
+
*
|
|
645
|
+
* @publicApi
|
|
646
|
+
*/
|
|
647
|
+
interface ParamMap {
|
|
648
|
+
/**
|
|
649
|
+
* Reports whether the map contains a given parameter.
|
|
650
|
+
* @param name The parameter name.
|
|
651
|
+
* @returns True if the map contains the given parameter, false otherwise.
|
|
652
|
+
*/
|
|
653
|
+
has(name: string): boolean;
|
|
654
|
+
/**
|
|
655
|
+
* Retrieves a single value for a parameter.
|
|
656
|
+
* @param name The parameter name.
|
|
657
|
+
* @return The parameter's single value,
|
|
658
|
+
* or the first value if the parameter has multiple values,
|
|
659
|
+
* or `null` when there is no such parameter.
|
|
660
|
+
*/
|
|
661
|
+
get(name: string): string | null;
|
|
662
|
+
/**
|
|
663
|
+
* Retrieves multiple values for a parameter.
|
|
664
|
+
* @param name The parameter name.
|
|
665
|
+
* @return An array containing one or more values,
|
|
666
|
+
* or an empty array if there is no such parameter.
|
|
667
|
+
*
|
|
668
|
+
*/
|
|
669
|
+
getAll(name: string): string[];
|
|
670
|
+
/** Names of the parameters in the map. */
|
|
671
|
+
readonly keys: string[];
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Converts a `Params` instance to a `ParamMap`.
|
|
675
|
+
* @param params The instance to convert.
|
|
676
|
+
* @returns The new map instance.
|
|
677
|
+
*
|
|
678
|
+
* @publicApi
|
|
679
|
+
*/
|
|
680
|
+
declare function convertToParamMap(params: Params): ParamMap;
|
|
681
|
+
/**
|
|
682
|
+
* Matches the route configuration (`route`) against the actual URL (`segments`).
|
|
683
|
+
*
|
|
684
|
+
* When no matcher is defined on a `Route`, this is the matcher used by the Router by default.
|
|
685
|
+
*
|
|
686
|
+
* @param segments The remaining unmatched segments in the current navigation
|
|
687
|
+
* @param segmentGroup The current segment group being matched
|
|
688
|
+
* @param route The `Route` to match against.
|
|
689
|
+
*
|
|
690
|
+
* @see {@link UrlMatchResult}
|
|
691
|
+
* @see {@link Route}
|
|
692
|
+
*
|
|
693
|
+
* @returns The resulting match information or `null` if the `route` should not match.
|
|
694
|
+
* @publicApi
|
|
695
|
+
*/
|
|
696
|
+
declare function defaultUrlMatcher(segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult | null;
|
|
697
|
+
|
|
687
698
|
/**
|
|
688
699
|
* An `InjectionToken` provided by the `RouterOutlet` and can be set using the `routerOutletData`
|
|
689
700
|
* input.
|
|
@@ -1558,7 +1569,7 @@ declare class UrlTree {
|
|
|
1558
1569
|
/** The fragment of the URL */
|
|
1559
1570
|
fragment?: string | null);
|
|
1560
1571
|
get queryParamMap(): ParamMap;
|
|
1561
|
-
/** @
|
|
1572
|
+
/** @docs-private */
|
|
1562
1573
|
toString(): string;
|
|
1563
1574
|
}
|
|
1564
1575
|
/**
|
|
@@ -1590,7 +1601,7 @@ declare class UrlSegmentGroup {
|
|
|
1590
1601
|
hasChildren(): boolean;
|
|
1591
1602
|
/** Number of child segments */
|
|
1592
1603
|
get numberOfChildren(): number;
|
|
1593
|
-
/** @
|
|
1604
|
+
/** @docs-private */
|
|
1594
1605
|
toString(): string;
|
|
1595
1606
|
}
|
|
1596
1607
|
/**
|
|
@@ -1634,7 +1645,7 @@ declare class UrlSegment {
|
|
|
1634
1645
|
[name: string]: string;
|
|
1635
1646
|
});
|
|
1636
1647
|
get parameterMap(): ParamMap;
|
|
1637
|
-
/** @
|
|
1648
|
+
/** @docs-private */
|
|
1638
1649
|
toString(): string;
|
|
1639
1650
|
}
|
|
1640
1651
|
/**
|
package/types/router.d.ts
CHANGED
package/types/testing.d.ts
CHANGED
package/types/upgrade.d.ts
CHANGED