@angular/router 15.0.0-next.6 → 15.0.0-rc.0
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/esm2020/src/components/empty_outlet.mjs +3 -3
- package/esm2020/src/directives/router_link.mjs +3 -3
- package/esm2020/src/directives/router_link_active.mjs +3 -3
- package/esm2020/src/directives/router_outlet.mjs +3 -3
- package/esm2020/src/page_title_strategy.mjs +6 -6
- package/esm2020/src/provide_router.mjs +4 -10
- package/esm2020/src/route_reuse_strategy.mjs +2 -2
- package/esm2020/src/router.mjs +3 -3
- package/esm2020/src/router_config.mjs +1 -1
- package/esm2020/src/router_config_loader.mjs +3 -3
- package/esm2020/src/router_module.mjs +8 -7
- package/esm2020/src/router_outlet_context.mjs +3 -3
- package/esm2020/src/router_preloader.mjs +9 -9
- package/esm2020/src/router_scroller.mjs +18 -8
- package/esm2020/src/url_tree.mjs +3 -3
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_module.mjs +4 -4
- package/fesm2015/router.mjs +66 -61
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +5 -5
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +66 -61
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +5 -5
- package/fesm2020/upgrade.mjs +1 -1
- package/index.d.ts +2 -20
- package/package.json +4 -4
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
package/fesm2015/router.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.0-
|
|
2
|
+
* @license Angular v15.0.0-rc.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -461,9 +461,9 @@ function mapChildrenIntoArray(segment, fn) {
|
|
|
461
461
|
*/
|
|
462
462
|
class UrlSerializer {
|
|
463
463
|
}
|
|
464
|
-
UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
465
|
-
UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-
|
|
466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
464
|
+
UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
465
|
+
UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
|
|
466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: UrlSerializer, decorators: [{
|
|
467
467
|
type: Injectable,
|
|
468
468
|
args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
|
|
469
469
|
}] });
|
|
@@ -2394,9 +2394,9 @@ class ChildrenOutletContexts {
|
|
|
2394
2394
|
return this.contexts.get(childName) || null;
|
|
2395
2395
|
}
|
|
2396
2396
|
}
|
|
2397
|
-
ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
2398
|
-
ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-
|
|
2399
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
2397
|
+
ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2398
|
+
ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
|
|
2399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
|
|
2400
2400
|
type: Injectable,
|
|
2401
2401
|
args: [{ providedIn: 'root' }]
|
|
2402
2402
|
}] });
|
|
@@ -2617,9 +2617,9 @@ class RouterOutlet {
|
|
|
2617
2617
|
this.activateEvents.emit(this.activated.instance);
|
|
2618
2618
|
}
|
|
2619
2619
|
}
|
|
2620
|
-
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
2621
|
-
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-
|
|
2622
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
2620
|
+
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2621
|
+
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: "name" }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 });
|
|
2622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2623
2623
|
type: Directive,
|
|
2624
2624
|
args: [{
|
|
2625
2625
|
selector: 'router-outlet',
|
|
@@ -2679,9 +2679,9 @@ function isComponentFactoryResolver(item) {
|
|
|
2679
2679
|
*/
|
|
2680
2680
|
class ɵEmptyOutletComponent {
|
|
2681
2681
|
}
|
|
2682
|
-
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
2683
|
-
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0-
|
|
2684
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
2682
|
+
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2683
|
+
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
|
|
2684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2685
2685
|
type: Component,
|
|
2686
2686
|
args: [{
|
|
2687
2687
|
template: `<router-outlet></router-outlet>`,
|
|
@@ -4383,9 +4383,9 @@ class TitleStrategy {
|
|
|
4383
4383
|
return snapshot.data[RouteTitleKey];
|
|
4384
4384
|
}
|
|
4385
4385
|
}
|
|
4386
|
-
TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
4387
|
-
TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-
|
|
4388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
4386
|
+
TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4387
|
+
TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
|
|
4388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: TitleStrategy, decorators: [{
|
|
4389
4389
|
type: Injectable,
|
|
4390
4390
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
|
|
4391
4391
|
}] });
|
|
@@ -4409,9 +4409,9 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
4409
4409
|
}
|
|
4410
4410
|
}
|
|
4411
4411
|
}
|
|
4412
|
-
DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
4413
|
-
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-
|
|
4414
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
4412
|
+
DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4413
|
+
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
|
|
4414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
|
|
4415
4415
|
type: Injectable,
|
|
4416
4416
|
args: [{ providedIn: 'root' }]
|
|
4417
4417
|
}], ctorParameters: function () { return [{ type: i1.Title }]; } });
|
|
@@ -4449,7 +4449,7 @@ class RouteReuseStrategy {
|
|
|
4449
4449
|
*
|
|
4450
4450
|
* This base route reuse strategy only reuses routes when the matched router configs are
|
|
4451
4451
|
* identical. This prevents components from being destroyed and recreated
|
|
4452
|
-
* when just the
|
|
4452
|
+
* when just the route parameters, query parameters or fragment change
|
|
4453
4453
|
* (that is, the existing component is _reused_).
|
|
4454
4454
|
*
|
|
4455
4455
|
* This strategy does not store any routes for later reuse.
|
|
@@ -4634,9 +4634,9 @@ class RouterConfigLoader {
|
|
|
4634
4634
|
}));
|
|
4635
4635
|
}
|
|
4636
4636
|
}
|
|
4637
|
-
RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
4638
|
-
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-
|
|
4639
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
4637
|
+
RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4638
|
+
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
|
|
4639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterConfigLoader, decorators: [{
|
|
4640
4640
|
type: Injectable,
|
|
4641
4641
|
args: [{ providedIn: 'root' }]
|
|
4642
4642
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
|
|
@@ -5668,9 +5668,9 @@ class Router {
|
|
|
5668
5668
|
return { navigationId };
|
|
5669
5669
|
}
|
|
5670
5670
|
}
|
|
5671
|
-
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
5672
|
-
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-
|
|
5673
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
5671
|
+
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
5672
|
+
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: Router, providedIn: 'root', useFactory: setupRouter });
|
|
5673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: Router, decorators: [{
|
|
5674
5674
|
type: Injectable,
|
|
5675
5675
|
args: [{
|
|
5676
5676
|
providedIn: 'root',
|
|
@@ -5964,9 +5964,9 @@ class RouterLink {
|
|
|
5964
5964
|
});
|
|
5965
5965
|
}
|
|
5966
5966
|
}
|
|
5967
|
-
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
5968
|
-
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-
|
|
5969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
5967
|
+
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", 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 });
|
|
5968
|
+
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: RouterLink, isStandalone: true, selector: ":not(a):not(area)[routerLink],a[routerLink],area[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", relativeTo: "relativeTo", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
|
|
5969
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterLink, decorators: [{
|
|
5970
5970
|
type: Directive,
|
|
5971
5971
|
args: [{
|
|
5972
5972
|
selector: ':not(a):not(area)[routerLink],a[routerLink],area[routerLink]',
|
|
@@ -6195,9 +6195,9 @@ class RouterLinkActive {
|
|
|
6195
6195
|
return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);
|
|
6196
6196
|
}
|
|
6197
6197
|
}
|
|
6198
|
-
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
6199
|
-
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-
|
|
6200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
6198
|
+
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6199
|
+
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", 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 });
|
|
6200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
6201
6201
|
type: Directive,
|
|
6202
6202
|
args: [{
|
|
6203
6203
|
selector: '[routerLinkActive]',
|
|
@@ -6259,9 +6259,9 @@ class PreloadAllModules {
|
|
|
6259
6259
|
return fn().pipe(catchError(() => of(null)));
|
|
6260
6260
|
}
|
|
6261
6261
|
}
|
|
6262
|
-
PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
6263
|
-
PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-
|
|
6264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
6262
|
+
PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6263
|
+
PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
|
|
6264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreloadAllModules, decorators: [{
|
|
6265
6265
|
type: Injectable,
|
|
6266
6266
|
args: [{ providedIn: 'root' }]
|
|
6267
6267
|
}] });
|
|
@@ -6279,9 +6279,9 @@ class NoPreloading {
|
|
|
6279
6279
|
return of(null);
|
|
6280
6280
|
}
|
|
6281
6281
|
}
|
|
6282
|
-
NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
6283
|
-
NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-
|
|
6284
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
6282
|
+
NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6283
|
+
NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NoPreloading, providedIn: 'root' });
|
|
6284
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NoPreloading, decorators: [{
|
|
6285
6285
|
type: Injectable,
|
|
6286
6286
|
args: [{ providedIn: 'root' }]
|
|
6287
6287
|
}] });
|
|
@@ -6377,9 +6377,9 @@ class RouterPreloader {
|
|
|
6377
6377
|
});
|
|
6378
6378
|
}
|
|
6379
6379
|
}
|
|
6380
|
-
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
6381
|
-
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-
|
|
6382
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
6380
|
+
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6381
|
+
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
|
|
6382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
6383
6383
|
type: Injectable,
|
|
6384
6384
|
args: [{ providedIn: 'root' }]
|
|
6385
6385
|
}], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
|
|
@@ -6387,9 +6387,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6",
|
|
|
6387
6387
|
const ROUTER_SCROLLER = new InjectionToken('');
|
|
6388
6388
|
class RouterScroller {
|
|
6389
6389
|
constructor(router,
|
|
6390
|
-
/** @docsNotRequired */ viewportScroller, options = {}) {
|
|
6390
|
+
/** @docsNotRequired */ viewportScroller, zone, options = {}) {
|
|
6391
6391
|
this.router = router;
|
|
6392
6392
|
this.viewportScroller = viewportScroller;
|
|
6393
|
+
this.zone = zone;
|
|
6393
6394
|
this.options = options;
|
|
6394
6395
|
this.lastId = 0;
|
|
6395
6396
|
this.lastSource = 'imperative';
|
|
@@ -6448,7 +6449,16 @@ class RouterScroller {
|
|
|
6448
6449
|
});
|
|
6449
6450
|
}
|
|
6450
6451
|
scheduleScrollEvent(routerEvent, anchor) {
|
|
6451
|
-
this.
|
|
6452
|
+
this.zone.runOutsideAngular(() => {
|
|
6453
|
+
// The scroll event needs to be delayed until after change detection. Otherwise, we may
|
|
6454
|
+
// attempt to restore the scroll position before the router outlet has fully rendered the
|
|
6455
|
+
// component by executing its update block of the template function.
|
|
6456
|
+
setTimeout(() => {
|
|
6457
|
+
this.zone.run(() => {
|
|
6458
|
+
this.router.triggerEvent(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));
|
|
6459
|
+
});
|
|
6460
|
+
}, 0);
|
|
6461
|
+
});
|
|
6452
6462
|
}
|
|
6453
6463
|
/** @nodoc */
|
|
6454
6464
|
ngOnDestroy() {
|
|
@@ -6460,11 +6470,11 @@ class RouterScroller {
|
|
|
6460
6470
|
}
|
|
6461
6471
|
}
|
|
6462
6472
|
}
|
|
6463
|
-
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
6464
|
-
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-
|
|
6465
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
6473
|
+
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
6474
|
+
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterScroller });
|
|
6475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterScroller, decorators: [{
|
|
6466
6476
|
type: Injectable
|
|
6467
|
-
}], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: undefined }]; } });
|
|
6477
|
+
}], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });
|
|
6468
6478
|
|
|
6469
6479
|
/**
|
|
6470
6480
|
* @license
|
|
@@ -6506,7 +6516,6 @@ const NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || ngDevMode;
|
|
|
6506
6516
|
* @see `RouterFeatures`
|
|
6507
6517
|
*
|
|
6508
6518
|
* @publicApi
|
|
6509
|
-
* @developerPreview
|
|
6510
6519
|
* @param routes A set of `Route`s to use for the application routing table.
|
|
6511
6520
|
* @param features Optional features to configure additional router behaviors.
|
|
6512
6521
|
* @returns A set of providers to setup a Router.
|
|
@@ -6572,7 +6581,6 @@ function provideRoutes(routes) {
|
|
|
6572
6581
|
* @see `ViewportScroller`
|
|
6573
6582
|
*
|
|
6574
6583
|
* @publicApi
|
|
6575
|
-
* @developerPreview
|
|
6576
6584
|
* @param options Set of configuration parameters to customize scrolling behavior, see
|
|
6577
6585
|
* `InMemoryScrollingOptions` for additional information.
|
|
6578
6586
|
* @returns A set of providers for use with `provideRouter`.
|
|
@@ -6583,7 +6591,8 @@ function withInMemoryScrolling(options = {}) {
|
|
|
6583
6591
|
useFactory: () => {
|
|
6584
6592
|
const router = inject(Router);
|
|
6585
6593
|
const viewportScroller = inject(ViewportScroller);
|
|
6586
|
-
|
|
6594
|
+
const zone = inject(NgZone);
|
|
6595
|
+
return new RouterScroller(router, viewportScroller, zone, options);
|
|
6587
6596
|
},
|
|
6588
6597
|
}];
|
|
6589
6598
|
return routerFeature(4 /* RouterFeatureKind.InMemoryScrollingFeature */, providers);
|
|
@@ -6642,7 +6651,6 @@ const INITIAL_NAVIGATION = new InjectionToken(NG_DEV_MODE$1 ? 'initial navigatio
|
|
|
6642
6651
|
* @see `provideRouter`
|
|
6643
6652
|
*
|
|
6644
6653
|
* @publicApi
|
|
6645
|
-
* @developerPreview
|
|
6646
6654
|
* @returns A set of providers for use with `provideRouter`.
|
|
6647
6655
|
*/
|
|
6648
6656
|
function withEnabledBlockingInitialNavigation() {
|
|
@@ -6739,7 +6747,6 @@ function withEnabledBlockingInitialNavigation() {
|
|
|
6739
6747
|
* @returns A set of providers for use with `provideRouter`.
|
|
6740
6748
|
*
|
|
6741
6749
|
* @publicApi
|
|
6742
|
-
* @developerPreview
|
|
6743
6750
|
*/
|
|
6744
6751
|
function withDisabledInitialNavigation() {
|
|
6745
6752
|
const providers = [
|
|
@@ -6780,7 +6787,6 @@ function withDisabledInitialNavigation() {
|
|
|
6780
6787
|
* @returns A set of providers for use with `provideRouter`.
|
|
6781
6788
|
*
|
|
6782
6789
|
* @publicApi
|
|
6783
|
-
* @developerPreview
|
|
6784
6790
|
*/
|
|
6785
6791
|
function withDebugTracing() {
|
|
6786
6792
|
let providers = [];
|
|
@@ -6833,7 +6839,6 @@ const ROUTER_PRELOADER = new InjectionToken(NG_DEV_MODE$1 ? 'router preloader' :
|
|
|
6833
6839
|
* @returns A set of providers for use with `provideRouter`.
|
|
6834
6840
|
*
|
|
6835
6841
|
* @publicApi
|
|
6836
|
-
* @developerPreview
|
|
6837
6842
|
*/
|
|
6838
6843
|
function withPreloading(preloadingStrategy) {
|
|
6839
6844
|
const providers = [
|
|
@@ -6868,7 +6873,6 @@ function withPreloading(preloadingStrategy) {
|
|
|
6868
6873
|
* @returns A set of providers for use with `provideRouter`.
|
|
6869
6874
|
*
|
|
6870
6875
|
* @publicApi
|
|
6871
|
-
* @developerPreview
|
|
6872
6876
|
*/
|
|
6873
6877
|
function withRouterConfig(options) {
|
|
6874
6878
|
const providers = [
|
|
@@ -6991,10 +6995,10 @@ class RouterModule {
|
|
|
6991
6995
|
return { ngModule: RouterModule, providers: [provideRoutes(routes)] };
|
|
6992
6996
|
}
|
|
6993
6997
|
}
|
|
6994
|
-
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-
|
|
6995
|
-
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-
|
|
6996
|
-
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-
|
|
6997
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-
|
|
6998
|
+
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6999
|
+
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
|
|
7000
|
+
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
|
|
7001
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: RouterModule, decorators: [{
|
|
6998
7002
|
type: NgModule,
|
|
6999
7003
|
args: [{
|
|
7000
7004
|
imports: ROUTER_DIRECTIVES,
|
|
@@ -7018,11 +7022,12 @@ function provideRouterScroller() {
|
|
|
7018
7022
|
useFactory: () => {
|
|
7019
7023
|
const router = inject(Router);
|
|
7020
7024
|
const viewportScroller = inject(ViewportScroller);
|
|
7025
|
+
const zone = inject(NgZone);
|
|
7021
7026
|
const config = inject(ROUTER_CONFIGURATION);
|
|
7022
7027
|
if (config.scrollOffset) {
|
|
7023
7028
|
viewportScroller.setOffset(config.scrollOffset);
|
|
7024
7029
|
}
|
|
7025
|
-
return new RouterScroller(router, viewportScroller, config);
|
|
7030
|
+
return new RouterScroller(router, viewportScroller, zone, config);
|
|
7026
7031
|
},
|
|
7027
7032
|
};
|
|
7028
7033
|
}
|
|
@@ -7080,7 +7085,7 @@ function provideRouterInitializer() {
|
|
|
7080
7085
|
/**
|
|
7081
7086
|
* @publicApi
|
|
7082
7087
|
*/
|
|
7083
|
-
const VERSION = new Version('15.0.0-
|
|
7088
|
+
const VERSION = new Version('15.0.0-rc.0');
|
|
7084
7089
|
|
|
7085
7090
|
/**
|
|
7086
7091
|
* @license
|