@angular/router 20.3.0 → 20.3.1
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.mjs +2 -2
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/router2.mjs +49 -49
- package/fesm2022/router2.mjs.map +1 -1
- package/fesm2022/router_module.mjs +27 -24
- package/fesm2022/router_module.mjs.map +1 -1
- package/fesm2022/testing.mjs +11 -11
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +1 -1
- package/fesm2022/upgrade.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +4 -4
- package/router_module.d.d.ts +4 -1
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.3.
|
|
2
|
+
* @license Angular v20.3.1
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -284,7 +284,7 @@ class RouterLink {
|
|
|
284
284
|
this.queryParamsHandling ||
|
|
285
285
|
this.preserveFragment ||
|
|
286
286
|
this.relativeTo)) {
|
|
287
|
-
throw new _RuntimeError(
|
|
287
|
+
throw new _RuntimeError(4017 /* RuntimeErrorCode.INVALID_ROUTER_LINK_INPUTS */, 'Cannot configure queryParams or fragment when using a UrlTree as the routerLink input value.');
|
|
288
288
|
}
|
|
289
289
|
if (this.isAnchorElement) {
|
|
290
290
|
this.updateHref();
|
|
@@ -387,10 +387,10 @@ class RouterLink {
|
|
|
387
387
|
preserveFragment: this.preserveFragment,
|
|
388
388
|
});
|
|
389
389
|
}
|
|
390
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
391
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.
|
|
390
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
|
|
391
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.1", type: RouterLink, isStandalone: true, selector: "[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", info: "info", relativeTo: "relativeTo", preserveFragment: ["preserveFragment", "preserveFragment", booleanAttribute], skipLocationChange: ["skipLocationChange", "skipLocationChange", booleanAttribute], replaceUrl: ["replaceUrl", "replaceUrl", booleanAttribute], routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.href": "reactiveHref()", "attr.target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
|
|
392
392
|
}
|
|
393
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterLink, decorators: [{
|
|
394
394
|
type: Directive,
|
|
395
395
|
args: [{
|
|
396
396
|
selector: '[routerLink]',
|
|
@@ -505,6 +505,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
505
505
|
* <a routerLink="/" routerLinkActive="active" ariaCurrentWhenActive="page">Home Page</a>
|
|
506
506
|
* ```
|
|
507
507
|
*
|
|
508
|
+
* NOTE: RouterLinkActive is a `ContentChildren` query.
|
|
509
|
+
* Content children queries do not retrieve elements or directives that are in other components' templates, since a component's template is always a black box to its ancestors.
|
|
510
|
+
*
|
|
508
511
|
* @ngModule RouterModule
|
|
509
512
|
*
|
|
510
513
|
* @publicApi
|
|
@@ -646,10 +649,10 @@ class RouterLinkActive {
|
|
|
646
649
|
const isActiveCheckFn = this.isLinkActive(this.router);
|
|
647
650
|
return (this.link && isActiveCheckFn(this.link)) || this.links.some(isActiveCheckFn);
|
|
648
651
|
}
|
|
649
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
650
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
652
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
653
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
|
|
651
654
|
}
|
|
652
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
653
656
|
type: Directive,
|
|
654
657
|
args: [{
|
|
655
658
|
selector: '[routerLinkActive]',
|
|
@@ -700,10 +703,10 @@ class PreloadAllModules {
|
|
|
700
703
|
preload(route, fn) {
|
|
701
704
|
return fn().pipe(catchError(() => of(null)));
|
|
702
705
|
}
|
|
703
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
704
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
706
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
707
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
|
|
705
708
|
}
|
|
706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: PreloadAllModules, decorators: [{
|
|
707
710
|
type: Injectable,
|
|
708
711
|
args: [{ providedIn: 'root' }]
|
|
709
712
|
}] });
|
|
@@ -720,10 +723,10 @@ class NoPreloading {
|
|
|
720
723
|
preload(route, fn) {
|
|
721
724
|
return of(null);
|
|
722
725
|
}
|
|
723
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
724
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
726
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
727
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: NoPreloading, providedIn: 'root' });
|
|
725
728
|
}
|
|
726
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: NoPreloading, decorators: [{
|
|
727
730
|
type: Injectable,
|
|
728
731
|
args: [{ providedIn: 'root' }]
|
|
729
732
|
}] });
|
|
@@ -819,10 +822,10 @@ class RouterPreloader {
|
|
|
819
822
|
}
|
|
820
823
|
});
|
|
821
824
|
}
|
|
822
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
823
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
825
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
826
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
|
|
824
827
|
}
|
|
825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
826
829
|
type: Injectable,
|
|
827
830
|
args: [{ providedIn: 'root' }]
|
|
828
831
|
}], ctorParameters: () => [{ type: Router }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }] });
|
|
@@ -931,10 +934,10 @@ class RouterScroller {
|
|
|
931
934
|
this.routerEventsSubscription?.unsubscribe();
|
|
932
935
|
this.scrollEventsSubscription?.unsubscribe();
|
|
933
936
|
}
|
|
934
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
935
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
937
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
938
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterScroller });
|
|
936
939
|
}
|
|
937
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
940
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterScroller, decorators: [{
|
|
938
941
|
type: Injectable
|
|
939
942
|
}], ctorParameters: () => [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }] });
|
|
940
943
|
|
|
@@ -1599,11 +1602,11 @@ class RouterModule {
|
|
|
1599
1602
|
providers: [{ provide: ROUTES, multi: true, useValue: routes }],
|
|
1600
1603
|
};
|
|
1601
1604
|
}
|
|
1602
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1603
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
1604
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
1605
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1606
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, _EmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, _EmptyOutletComponent] });
|
|
1607
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterModule });
|
|
1605
1608
|
}
|
|
1606
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1609
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: RouterModule, decorators: [{
|
|
1607
1610
|
type: NgModule,
|
|
1608
1611
|
args: [{
|
|
1609
1612
|
imports: ROUTER_DIRECTIVES,
|