@angular/router 15.0.0-next.4 → 15.0.0-next.5

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,11 +1,11 @@
1
1
  /**
2
- * @license Angular v15.0.0-next.4
2
+ * @license Angular v15.0.0-next.5
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import * as i0 from '@angular/core';
8
- import { ɵisObservable, ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, Directive, Attribute, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, ɵisInjectable, inject, InjectionToken, InjectFlags, NgModuleFactory, Injector, Compiler, NgModuleRef, ɵConsole, NgZone, ɵcoerceToBoolean, Input, HostListener, HostBinding, Optional, ContentChildren, APP_BOOTSTRAP_LISTENER, ApplicationRef, APP_INITIALIZER, ENVIRONMENT_INITIALIZER, NgProbeToken, SkipSelf, NgModule, Inject, Version } from '@angular/core';
8
+ import { ɵisObservable, ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, EnvironmentInjector, Directive, Input, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, ɵisInjectable, InjectionToken, InjectFlags, NgModuleFactory, Injector, Compiler, NgModuleRef, ɵConsole, NgZone, ɵcoerceToBoolean, ɵɵsanitizeUrlOrResourceUrl, Attribute, HostBinding, HostListener, Optional, ContentChildren, APP_BOOTSTRAP_LISTENER, ApplicationRef, APP_INITIALIZER, ENVIRONMENT_INITIALIZER, NgProbeToken, SkipSelf, NgModule, Inject, Version } from '@angular/core';
9
9
  import { from, of, BehaviorSubject, EmptyError, combineLatest, concat, defer, pipe, throwError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';
10
10
  import * as i3 from '@angular/common';
11
11
  import { Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';
@@ -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-next.4", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
465
- UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
466
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: UrlSerializer, decorators: [{
464
+ UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
465
+ UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: UrlSerializer, decorators: [{
467
467
  type: Injectable,
468
468
  args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
469
469
  }] });
@@ -2388,9 +2388,9 @@ class ChildrenOutletContexts {
2388
2388
  return this.contexts.get(childName) || null;
2389
2389
  }
2390
2390
  }
2391
- ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2392
- ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2391
+ ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2392
+ ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2394
2394
  type: Injectable,
2395
2395
  args: [{ providedIn: 'root' }]
2396
2396
  }] });
@@ -2455,13 +2455,15 @@ const NG_DEV_MODE$7 = typeof ngDevMode === 'undefined' || ngDevMode;
2455
2455
  * @publicApi
2456
2456
  */
2457
2457
  class RouterOutlet {
2458
- constructor(parentContexts, location, name, changeDetector, environmentInjector) {
2459
- this.parentContexts = parentContexts;
2460
- this.location = location;
2461
- this.changeDetector = changeDetector;
2462
- this.environmentInjector = environmentInjector;
2458
+ constructor() {
2463
2459
  this.activated = null;
2464
2460
  this._activatedRoute = null;
2461
+ /**
2462
+ * The name of the outlet
2463
+ *
2464
+ * @see [named outlets](guide/router-tutorial-toh#displaying-multiple-routes-in-named-outlets)
2465
+ */
2466
+ this.name = PRIMARY_OUTLET;
2465
2467
  this.activateEvents = new EventEmitter();
2466
2468
  this.deactivateEvents = new EventEmitter();
2467
2469
  /**
@@ -2474,31 +2476,59 @@ class RouterOutlet {
2474
2476
  * subtree.
2475
2477
  */
2476
2478
  this.detachEvents = new EventEmitter();
2477
- this.name = name || PRIMARY_OUTLET;
2478
- parentContexts.onChildOutletCreated(this.name, this);
2479
+ this.parentContexts = inject(ChildrenOutletContexts);
2480
+ this.location = inject(ViewContainerRef);
2481
+ this.changeDetector = inject(ChangeDetectorRef);
2482
+ this.environmentInjector = inject(EnvironmentInjector);
2483
+ }
2484
+ /** @nodoc */
2485
+ ngOnChanges(changes) {
2486
+ if (changes['name']) {
2487
+ const { firstChange, previousValue } = changes['name'];
2488
+ if (firstChange) {
2489
+ // The first change is handled by ngOnInit. Because ngOnChanges doesn't get called when no
2490
+ // input is set at all, we need to centrally handle the first change there.
2491
+ return;
2492
+ }
2493
+ // unregister with the old name
2494
+ if (this.isTrackedInParentContexts(previousValue)) {
2495
+ this.deactivate();
2496
+ this.parentContexts.onChildOutletDestroyed(previousValue);
2497
+ }
2498
+ // register the new name
2499
+ this.initializeOutletWithName();
2500
+ }
2479
2501
  }
2480
2502
  /** @nodoc */
2481
2503
  ngOnDestroy() {
2482
2504
  // Ensure that the registered outlet is this one before removing it on the context.
2483
- if (this.parentContexts.getContext(this.name)?.outlet === this) {
2505
+ if (this.isTrackedInParentContexts(this.name)) {
2484
2506
  this.parentContexts.onChildOutletDestroyed(this.name);
2485
2507
  }
2486
2508
  }
2509
+ isTrackedInParentContexts(outletName) {
2510
+ return this.parentContexts.getContext(outletName)?.outlet === this;
2511
+ }
2487
2512
  /** @nodoc */
2488
2513
  ngOnInit() {
2489
- if (!this.activated) {
2490
- // If the outlet was not instantiated at the time the route got activated we need to populate
2491
- // the outlet when it is initialized (ie inside a NgIf)
2492
- const context = this.parentContexts.getContext(this.name);
2493
- if (context && context.route) {
2494
- if (context.attachRef) {
2495
- // `attachRef` is populated when there is an existing component to mount
2496
- this.attach(context.attachRef, context.route);
2497
- }
2498
- else {
2499
- // otherwise the component defined in the configuration is created
2500
- this.activateWith(context.route, context.injector);
2501
- }
2514
+ this.initializeOutletWithName();
2515
+ }
2516
+ initializeOutletWithName() {
2517
+ this.parentContexts.onChildOutletCreated(this.name, this);
2518
+ if (this.activated) {
2519
+ return;
2520
+ }
2521
+ // If the outlet was not instantiated at the time the route got activated we need to populate
2522
+ // the outlet when it is initialized (ie inside a NgIf)
2523
+ const context = this.parentContexts.getContext(this.name);
2524
+ if (context?.route) {
2525
+ if (context.attachRef) {
2526
+ // `attachRef` is populated when there is an existing component to mount
2527
+ this.attach(context.attachRef, context.route);
2528
+ }
2529
+ else {
2530
+ // otherwise the component defined in the configuration is created
2531
+ this.activateWith(context.route, context.injector);
2502
2532
  }
2503
2533
  }
2504
2534
  }
@@ -2580,19 +2610,18 @@ class RouterOutlet {
2580
2610
  this.activateEvents.emit(this.activated.instance);
2581
2611
  }
2582
2612
  }
2583
- RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterOutlet, deps: [{ token: ChildrenOutletContexts }, { token: i0.ViewContainerRef }, { token: 'name', attribute: true }, { token: i0.ChangeDetectorRef }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Directive });
2584
- RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.4", type: RouterOutlet, isStandalone: true, selector: "router-outlet", outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], ngImport: i0 });
2585
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterOutlet, decorators: [{
2613
+ RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2614
+ RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", 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 });
2615
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterOutlet, decorators: [{
2586
2616
  type: Directive,
2587
2617
  args: [{
2588
2618
  selector: 'router-outlet',
2589
2619
  exportAs: 'outlet',
2590
2620
  standalone: true,
2591
2621
  }]
2592
- }], ctorParameters: function () { return [{ type: ChildrenOutletContexts }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
2593
- type: Attribute,
2594
- args: ['name']
2595
- }] }, { type: i0.ChangeDetectorRef }, { type: i0.EnvironmentInjector }]; }, propDecorators: { activateEvents: [{
2622
+ }], propDecorators: { name: [{
2623
+ type: Input
2624
+ }], activateEvents: [{
2596
2625
  type: Output,
2597
2626
  args: ['activate']
2598
2627
  }], deactivateEvents: [{
@@ -2643,9 +2672,9 @@ function isComponentFactoryResolver(item) {
2643
2672
  */
2644
2673
  class ɵEmptyOutletComponent {
2645
2674
  }
2646
- ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2647
- ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0-next.4", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
2648
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2675
+ ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2676
+ ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0-next.5", 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"] }] });
2677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2649
2678
  type: Component,
2650
2679
  args: [{
2651
2680
  template: `<router-outlet></router-outlet>`,
@@ -4331,9 +4360,9 @@ class TitleStrategy {
4331
4360
  return snapshot.data[RouteTitleKey];
4332
4361
  }
4333
4362
  }
4334
- TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4335
- TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4336
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: TitleStrategy, decorators: [{
4363
+ TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4364
+ TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4365
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: TitleStrategy, decorators: [{
4337
4366
  type: Injectable,
4338
4367
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
4339
4368
  }] });
@@ -4357,9 +4386,9 @@ class DefaultTitleStrategy extends TitleStrategy {
4357
4386
  }
4358
4387
  }
4359
4388
  }
4360
- DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4361
- DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4362
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4389
+ DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4390
+ DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4363
4392
  type: Injectable,
4364
4393
  args: [{ providedIn: 'root' }]
4365
4394
  }], ctorParameters: function () { return [{ type: i1.Title }]; } });
@@ -4459,6 +4488,17 @@ const ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$4 ? 'router config'
4459
4488
  factory: () => ({}),
4460
4489
  });
4461
4490
 
4491
+ /**
4492
+ * @license
4493
+ * Copyright Google LLC All Rights Reserved.
4494
+ *
4495
+ * Use of this source code is governed by an MIT-style license that can be
4496
+ * found in the LICENSE file at https://angular.io/license
4497
+ */
4498
+ function deprecatedLoadChildrenString(injector, loadChildren) {
4499
+ return null;
4500
+ }
4501
+
4462
4502
  /**
4463
4503
  * @license
4464
4504
  * Copyright Google LLC All Rights Reserved.
@@ -4496,7 +4536,7 @@ class RouterConfigLoader {
4496
4536
  this.onLoadStartListener(route);
4497
4537
  }
4498
4538
  const loadRunner = wrapIntoObservable(route.loadComponent())
4499
- .pipe(tap(component => {
4539
+ .pipe(map(maybeUnwrapDefaultExport), tap(component => {
4500
4540
  if (this.onLoadEndListener) {
4501
4541
  this.onLoadEndListener(route);
4502
4542
  }
@@ -4555,7 +4595,12 @@ class RouterConfigLoader {
4555
4595
  return loader;
4556
4596
  }
4557
4597
  loadModuleFactoryOrRoutes(loadChildren) {
4558
- return wrapIntoObservable(loadChildren()).pipe(mergeMap((t) => {
4598
+ const deprecatedResult = deprecatedLoadChildrenString(this.injector, loadChildren);
4599
+ if (deprecatedResult) {
4600
+ return deprecatedResult;
4601
+ }
4602
+ return wrapIntoObservable(loadChildren())
4603
+ .pipe(map(maybeUnwrapDefaultExport), mergeMap((t) => {
4559
4604
  if (t instanceof NgModuleFactory || Array.isArray(t)) {
4560
4605
  return of(t);
4561
4606
  }
@@ -4565,12 +4610,23 @@ class RouterConfigLoader {
4565
4610
  }));
4566
4611
  }
4567
4612
  }
4568
- RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4569
- RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4570
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterConfigLoader, decorators: [{
4613
+ RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4614
+ RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4615
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterConfigLoader, decorators: [{
4571
4616
  type: Injectable,
4572
4617
  args: [{ providedIn: 'root' }]
4573
4618
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
4619
+ function isWrappedDefaultExport(value) {
4620
+ // We use `in` here with a string key `'default'`, because we expect `DefaultExport` objects to be
4621
+ // dynamically imported ES modules with a spec-mandated `default` key. Thus we don't expect that
4622
+ // `default` will be a renamed property.
4623
+ return value && typeof value === 'object' && 'default' in value;
4624
+ }
4625
+ function maybeUnwrapDefaultExport(input) {
4626
+ // As per `isWrappedDefaultExport`, the `default` key here is generated by the browser and not
4627
+ // subject to property renaming, so we reference it with bracket access.
4628
+ return isWrappedDefaultExport(input) ? input['default'] : input;
4629
+ }
4574
4630
 
4575
4631
  /**
4576
4632
  * @license
@@ -5595,9 +5651,9 @@ class Router {
5595
5651
  return { navigationId };
5596
5652
  }
5597
5653
  }
5598
- Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5599
- Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: Router, providedIn: 'root', useFactory: setupRouter });
5600
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: Router, decorators: [{
5654
+ Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5655
+ Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: Router, providedIn: 'root', useFactory: setupRouter });
5656
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: Router, decorators: [{
5601
5657
  type: Injectable,
5602
5658
  args: [{
5603
5659
  providedIn: 'root',
@@ -5721,19 +5777,36 @@ function isBrowserTriggeredNavigation(source) {
5721
5777
  * @publicApi
5722
5778
  */
5723
5779
  class RouterLink {
5724
- constructor(router, route, tabIndexAttribute, renderer, el) {
5780
+ constructor(router, route, tabIndexAttribute, renderer, el, locationStrategy) {
5725
5781
  this.router = router;
5726
5782
  this.route = route;
5727
5783
  this.tabIndexAttribute = tabIndexAttribute;
5728
5784
  this.renderer = renderer;
5729
5785
  this.el = el;
5786
+ this.locationStrategy = locationStrategy;
5730
5787
  this._preserveFragment = false;
5731
5788
  this._skipLocationChange = false;
5732
5789
  this._replaceUrl = false;
5790
+ /**
5791
+ * Represents an `href` attribute value applied to a host element,
5792
+ * when a host element is `<a>`. For other tags, the value is `null`.
5793
+ */
5794
+ this.href = null;
5733
5795
  this.commands = null;
5734
5796
  /** @internal */
5735
5797
  this.onChanges = new Subject();
5736
- this.setTabIndexIfNotOnNativeEl('0');
5798
+ const tagName = el.nativeElement.tagName;
5799
+ this.isAnchorElement = tagName === 'A' || tagName === 'AREA';
5800
+ if (this.isAnchorElement) {
5801
+ this.subscription = router.events.subscribe((s) => {
5802
+ if (s instanceof NavigationEnd) {
5803
+ this.updateHref();
5804
+ }
5805
+ });
5806
+ }
5807
+ else {
5808
+ this.setTabIndexIfNotOnNativeEl('0');
5809
+ }
5737
5810
  }
5738
5811
  /**
5739
5812
  * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the
@@ -5776,20 +5849,16 @@ class RouterLink {
5776
5849
  * instantiation.
5777
5850
  */
5778
5851
  setTabIndexIfNotOnNativeEl(newTabIndex) {
5779
- if (this.tabIndexAttribute != null /* both `null` and `undefined` */) {
5852
+ if (this.tabIndexAttribute != null /* both `null` and `undefined` */ || this.isAnchorElement) {
5780
5853
  return;
5781
5854
  }
5782
- const renderer = this.renderer;
5783
- const nativeElement = this.el.nativeElement;
5784
- if (newTabIndex !== null) {
5785
- renderer.setAttribute(nativeElement, 'tabindex', newTabIndex);
5786
- }
5787
- else {
5788
- renderer.removeAttribute(nativeElement, 'tabindex');
5789
- }
5855
+ this.applyAttributeValue('tabindex', newTabIndex);
5790
5856
  }
5791
5857
  /** @nodoc */
5792
5858
  ngOnChanges(changes) {
5859
+ if (this.isAnchorElement) {
5860
+ this.updateHref();
5861
+ }
5793
5862
  // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes
5794
5863
  // to the RouterLinks it's tracking.
5795
5864
  this.onChanges.next(this);
@@ -5812,17 +5881,61 @@ class RouterLink {
5812
5881
  }
5813
5882
  }
5814
5883
  /** @nodoc */
5815
- onClick() {
5884
+ onClick(button, ctrlKey, shiftKey, altKey, metaKey) {
5816
5885
  if (this.urlTree === null) {
5817
5886
  return true;
5818
5887
  }
5888
+ if (this.isAnchorElement) {
5889
+ if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {
5890
+ return true;
5891
+ }
5892
+ if (typeof this.target === 'string' && this.target != '_self') {
5893
+ return true;
5894
+ }
5895
+ }
5819
5896
  const extras = {
5820
5897
  skipLocationChange: this.skipLocationChange,
5821
5898
  replaceUrl: this.replaceUrl,
5822
5899
  state: this.state,
5823
5900
  };
5824
5901
  this.router.navigateByUrl(this.urlTree, extras);
5825
- return true;
5902
+ // Return `false` for `<a>` elements to prevent default action
5903
+ // and cancel the native behavior, since the navigation is handled
5904
+ // by the Router.
5905
+ return !this.isAnchorElement;
5906
+ }
5907
+ /** @nodoc */
5908
+ ngOnDestroy() {
5909
+ this.subscription?.unsubscribe();
5910
+ }
5911
+ updateHref() {
5912
+ this.href = this.urlTree !== null && this.locationStrategy ?
5913
+ this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)) :
5914
+ null;
5915
+ const sanitizedValue = this.href === null ?
5916
+ null :
5917
+ // This class represents a directive that can be added to both `<a>` elements,
5918
+ // as well as other elements. As a result, we can't define security context at
5919
+ // compile time. So the security context is deferred to runtime.
5920
+ // The `ɵɵsanitizeUrlOrResourceUrl` selects the necessary sanitizer function
5921
+ // based on the tag and property names. The logic mimics the one from
5922
+ // `packages/compiler/src/schema/dom_security_schema.ts`, which is used at compile time.
5923
+ //
5924
+ // Note: we should investigate whether we can switch to using `@HostBinding('attr.href')`
5925
+ // instead of applying a value via a renderer, after a final merge of the
5926
+ // `RouterLinkWithHref` directive.
5927
+ ɵɵsanitizeUrlOrResourceUrl(this.href, this.el.nativeElement.tagName.toLowerCase(), 'href');
5928
+ this.applyAttributeValue('href', sanitizedValue);
5929
+ }
5930
+ applyAttributeValue(attrName, attrValue) {
5931
+ const renderer = this.renderer;
5932
+ const nativeElement = this.el.nativeElement;
5933
+ if (attrValue !== null) {
5934
+ renderer.setAttribute(nativeElement, attrName, attrValue);
5935
+ }
5936
+ else {
5937
+ renderer.removeAttribute(nativeElement, attrName);
5938
+ }
5826
5939
  }
5827
5940
  get urlTree() {
5828
5941
  if (this.commands === null) {
@@ -5839,9 +5952,9 @@ class RouterLink {
5839
5952
  });
5840
5953
  }
5841
5954
  }
5842
- RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
5843
- RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.4", type: RouterLink, isStandalone: true, selector: ":not(a):not(area)[routerLink]", inputs: { queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", relativeTo: "relativeTo", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", routerLink: "routerLink" }, host: { listeners: { "click": "onClick()" } }, usesOnChanges: true, ngImport: i0 });
5844
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterLink, decorators: [{
5955
+ RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", 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 });
5956
+ RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: RouterLink, isStandalone: true, selector: ":not(a):not(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 });
5957
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterLink, decorators: [{
5845
5958
  type: Directive,
5846
5959
  args: [{
5847
5960
  selector: ':not(a):not(area)[routerLink]',
@@ -5850,7 +5963,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4",
5850
5963
  }], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: undefined, decorators: [{
5851
5964
  type: Attribute,
5852
5965
  args: ['tabindex']
5853
- }] }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { queryParams: [{
5966
+ }] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i3.LocationStrategy }]; }, propDecorators: { target: [{
5967
+ type: HostBinding,
5968
+ args: ['attr.target']
5969
+ }, {
5970
+ type: Input
5971
+ }], queryParams: [{
5854
5972
  type: Input
5855
5973
  }], fragment: [{
5856
5974
  type: Input
@@ -5870,7 +5988,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4",
5870
5988
  type: Input
5871
5989
  }], onClick: [{
5872
5990
  type: HostListener,
5873
- args: ['click']
5991
+ args: ['click',
5992
+ ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey']]
5874
5993
  }] } });
5875
5994
  /**
5876
5995
  * @description
@@ -5883,159 +6002,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4",
5883
6002
  *
5884
6003
  * @publicApi
5885
6004
  */
5886
- class RouterLinkWithHref {
5887
- constructor(router, route, locationStrategy) {
5888
- this.router = router;
5889
- this.route = route;
5890
- this.locationStrategy = locationStrategy;
5891
- this._preserveFragment = false;
5892
- this._skipLocationChange = false;
5893
- this._replaceUrl = false;
5894
- this.commands = null;
5895
- // the url displayed on the anchor element.
5896
- // @HostBinding('attr.href') is used rather than @HostBinding() because it removes the
5897
- // href attribute when it becomes `null`.
5898
- this.href = null;
5899
- /** @internal */
5900
- this.onChanges = new Subject();
5901
- this.subscription = router.events.subscribe((s) => {
5902
- if (s instanceof NavigationEnd) {
5903
- this.updateTargetUrlAndHref();
5904
- }
5905
- });
5906
- }
5907
- /**
5908
- * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the
5909
- * `UrlCreationOptions`.
5910
- * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}
5911
- * @see {@link Router#createUrlTree Router#createUrlTree}
5912
- */
5913
- set preserveFragment(preserveFragment) {
5914
- this._preserveFragment = ɵcoerceToBoolean(preserveFragment);
5915
- }
5916
- get preserveFragment() {
5917
- return this._preserveFragment;
5918
- }
5919
- /**
5920
- * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the
5921
- * `NavigationBehaviorOptions`.
5922
- * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}
5923
- * @see {@link Router#navigateByUrl Router#navigateByUrl}
5924
- */
5925
- set skipLocationChange(skipLocationChange) {
5926
- this._skipLocationChange = ɵcoerceToBoolean(skipLocationChange);
5927
- }
5928
- get skipLocationChange() {
5929
- return this._skipLocationChange;
5930
- }
5931
- /**
5932
- * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the
5933
- * `NavigationBehaviorOptions`.
5934
- * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}
5935
- * @see {@link Router#navigateByUrl Router#navigateByUrl}
5936
- */
5937
- set replaceUrl(replaceUrl) {
5938
- this._replaceUrl = ɵcoerceToBoolean(replaceUrl);
5939
- }
5940
- get replaceUrl() {
5941
- return this._replaceUrl;
5942
- }
5943
- /**
5944
- * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.
5945
- * - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.
5946
- * - **string**: shorthand for array of commands with just the string, i.e. `['/route']`
5947
- * - **null|undefined**: Disables the link by removing the `href`
5948
- * @see {@link Router#createUrlTree Router#createUrlTree}
5949
- */
5950
- set routerLink(commands) {
5951
- if (commands != null) {
5952
- this.commands = Array.isArray(commands) ? commands : [commands];
5953
- }
5954
- else {
5955
- this.commands = null;
5956
- }
5957
- }
5958
- /** @nodoc */
5959
- ngOnChanges(changes) {
5960
- this.updateTargetUrlAndHref();
5961
- this.onChanges.next(this);
5962
- }
5963
- /** @nodoc */
5964
- ngOnDestroy() {
5965
- this.subscription.unsubscribe();
5966
- }
5967
- /** @nodoc */
5968
- onClick(button, ctrlKey, shiftKey, altKey, metaKey) {
5969
- if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {
5970
- return true;
5971
- }
5972
- if (typeof this.target === 'string' && this.target != '_self' || this.urlTree === null) {
5973
- return true;
5974
- }
5975
- const extras = {
5976
- skipLocationChange: this.skipLocationChange,
5977
- replaceUrl: this.replaceUrl,
5978
- state: this.state
5979
- };
5980
- this.router.navigateByUrl(this.urlTree, extras);
5981
- return false;
5982
- }
5983
- updateTargetUrlAndHref() {
5984
- this.href = this.urlTree !== null ?
5985
- this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree)) :
5986
- null;
5987
- }
5988
- get urlTree() {
5989
- if (this.commands === null) {
5990
- return null;
5991
- }
5992
- return this.router.createUrlTree(this.commands, {
5993
- // If the `relativeTo` input is not defined, we want to use `this.route` by default.
5994
- // Otherwise, we should use the value provided by the user in the input.
5995
- relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,
5996
- queryParams: this.queryParams,
5997
- fragment: this.fragment,
5998
- queryParamsHandling: this.queryParamsHandling,
5999
- preserveFragment: this.preserveFragment,
6000
- });
6001
- }
6005
+ class RouterLinkWithHref extends RouterLink {
6002
6006
  }
6003
- RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterLinkWithHref, deps: [{ token: Router }, { token: ActivatedRoute }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
6004
- RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.4", type: RouterLinkWithHref, isStandalone: true, selector: "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", "attr.href": "this.href" } }, usesOnChanges: true, ngImport: i0 });
6005
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterLinkWithHref, decorators: [{
6007
+ RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterLinkWithHref, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6008
+ RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: RouterLinkWithHref, isStandalone: true, selector: "a[routerLink],area[routerLink]", usesInheritance: true, ngImport: i0 });
6009
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterLinkWithHref, decorators: [{
6006
6010
  type: Directive,
6007
- args: [{ selector: 'a[routerLink],area[routerLink]', standalone: true }]
6008
- }], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: i3.LocationStrategy }]; }, propDecorators: { target: [{
6009
- type: HostBinding,
6010
- args: ['attr.target']
6011
- }, {
6012
- type: Input
6013
- }], queryParams: [{
6014
- type: Input
6015
- }], fragment: [{
6016
- type: Input
6017
- }], queryParamsHandling: [{
6018
- type: Input
6019
- }], state: [{
6020
- type: Input
6021
- }], relativeTo: [{
6022
- type: Input
6023
- }], href: [{
6024
- type: HostBinding,
6025
- args: ['attr.href']
6026
- }], preserveFragment: [{
6027
- type: Input
6028
- }], skipLocationChange: [{
6029
- type: Input
6030
- }], replaceUrl: [{
6031
- type: Input
6032
- }], routerLink: [{
6033
- type: Input
6034
- }], onClick: [{
6035
- type: HostListener,
6036
- args: ['click',
6037
- ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey']]
6038
- }] } });
6011
+ args: [{
6012
+ selector: 'a[routerLink],area[routerLink]',
6013
+ standalone: true,
6014
+ }]
6015
+ }] });
6039
6016
 
6040
6017
  /**
6041
6018
  * @license
@@ -6227,9 +6204,9 @@ class RouterLinkActive {
6227
6204
  this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);
6228
6205
  }
6229
6206
  }
6230
- RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }, { token: RouterLinkWithHref, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6231
- RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.4", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }, { propertyName: "linksWithHrefs", predicate: RouterLinkWithHref, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
6232
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterLinkActive, decorators: [{
6207
+ RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }, { token: RouterLinkWithHref, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6208
+ RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }, { propertyName: "linksWithHrefs", predicate: RouterLinkWithHref, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
6209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterLinkActive, decorators: [{
6233
6210
  type: Directive,
6234
6211
  args: [{
6235
6212
  selector: '[routerLinkActive]',
@@ -6294,9 +6271,9 @@ class PreloadAllModules {
6294
6271
  return fn().pipe(catchError(() => of(null)));
6295
6272
  }
6296
6273
  }
6297
- PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6298
- PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6299
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: PreloadAllModules, decorators: [{
6274
+ PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6275
+ PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PreloadAllModules, decorators: [{
6300
6277
  type: Injectable,
6301
6278
  args: [{ providedIn: 'root' }]
6302
6279
  }] });
@@ -6314,9 +6291,9 @@ class NoPreloading {
6314
6291
  return of(null);
6315
6292
  }
6316
6293
  }
6317
- NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6318
- NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6319
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: NoPreloading, decorators: [{
6294
+ NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6295
+ NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NoPreloading, decorators: [{
6320
6297
  type: Injectable,
6321
6298
  args: [{ providedIn: 'root' }]
6322
6299
  }] });
@@ -6410,9 +6387,9 @@ class RouterPreloader {
6410
6387
  });
6411
6388
  }
6412
6389
  }
6413
- RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6414
- RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
6415
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterPreloader, decorators: [{
6390
+ RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6391
+ RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
6392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterPreloader, decorators: [{
6416
6393
  type: Injectable,
6417
6394
  args: [{ providedIn: 'root' }]
6418
6395
  }], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
@@ -6500,9 +6477,9 @@ class RouterScroller {
6500
6477
  }
6501
6478
  }
6502
6479
  }
6503
- RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6504
- RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterScroller });
6505
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterScroller, decorators: [{
6480
+ RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6481
+ RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterScroller });
6482
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterScroller, decorators: [{
6506
6483
  type: Injectable
6507
6484
  }], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: undefined }]; } });
6508
6485
 
@@ -7029,10 +7006,10 @@ class RouterModule {
7029
7006
  return { ngModule: RouterModule, providers: [provideRoutes(routes)] };
7030
7007
  }
7031
7008
  }
7032
- RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
7033
- RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] });
7034
- RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
7035
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.4", ngImport: i0, type: RouterModule, decorators: [{
7009
+ RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
7010
+ RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] });
7011
+ RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
7012
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RouterModule, decorators: [{
7036
7013
  type: NgModule,
7037
7014
  args: [{
7038
7015
  imports: ROUTER_DIRECTIVES,
@@ -7116,7 +7093,7 @@ function provideRouterInitializer() {
7116
7093
  /**
7117
7094
  * @publicApi
7118
7095
  */
7119
- const VERSION = new Version('15.0.0-next.4');
7096
+ const VERSION = new Version('15.0.0-next.5');
7120
7097
 
7121
7098
  /**
7122
7099
  * @license