@angular/router 14.1.0-rc.0 → 14.1.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.
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v14.1.0-rc.0
2
+ * @license Angular v14.1.0
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, EventEmitter, Directive, Attribute, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, InjectionToken, InjectFlags, NgModuleFactory, Injectable, NgModuleRef, ɵConsole, NgZone, ɵcoerceToBoolean, Input, HostListener, HostBinding, Optional, ContentChildren, Injector, Compiler, NgProbeToken, ANALYZE_FOR_ENTRY_COMPONENTS, SkipSelf, inject, APP_INITIALIZER, APP_BOOTSTRAP_LISTENER, NgModule, Inject, ApplicationRef, ENVIRONMENT_INITIALIZER, Version } from '@angular/core';
8
+ import { ɵisObservable, ɵisPromise, ɵRuntimeError, EventEmitter, Directive, Attribute, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, InjectionToken, InjectFlags, NgModuleFactory, Injectable, NgModuleRef, ɵConsole, NgZone, ɵcoerceToBoolean, Input, HostListener, HostBinding, Optional, ContentChildren, inject, Injector, Compiler, NgProbeToken, ANALYZE_FOR_ENTRY_COMPONENTS, SkipSelf, APP_INITIALIZER, APP_BOOTSTRAP_LISTENER, NgModule, Inject, ApplicationRef, ENVIRONMENT_INITIALIZER, Version } from '@angular/core';
9
9
  import { from, of, BehaviorSubject, combineLatest, concat, defer, pipe, throwError, EmptyError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';
10
10
  import * as i3 from '@angular/common';
11
11
  import { Location, LocationStrategy, HashLocationStrategy, PathLocationStrategy, ViewportScroller, LOCATION_INITIALIZED } from '@angular/common';
@@ -2538,9 +2538,9 @@ class RouterOutlet {
2538
2538
  this.activateEvents.emit(this.activated.instance);
2539
2539
  }
2540
2540
  }
2541
- RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterOutlet, deps: [{ token: ChildrenOutletContexts }, { token: i0.ViewContainerRef }, { token: 'name', attribute: true }, { token: i0.ChangeDetectorRef }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Directive });
2542
- RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0-rc.0", type: RouterOutlet, selector: "router-outlet", outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], ngImport: i0 });
2543
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterOutlet, decorators: [{
2541
+ RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterOutlet, deps: [{ token: ChildrenOutletContexts }, { token: i0.ViewContainerRef }, { token: 'name', attribute: true }, { token: i0.ChangeDetectorRef }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Directive });
2542
+ RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: RouterOutlet, selector: "router-outlet", outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], ngImport: i0 });
2543
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterOutlet, decorators: [{
2544
2544
  type: Directive,
2545
2545
  args: [{ selector: 'router-outlet', exportAs: 'outlet' }]
2546
2546
  }], ctorParameters: function () { return [{ type: ChildrenOutletContexts }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
@@ -2597,9 +2597,9 @@ function isComponentFactoryResolver(item) {
2597
2597
  */
2598
2598
  class ɵEmptyOutletComponent {
2599
2599
  }
2600
- ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2601
- ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0-rc.0", type: ɵEmptyOutletComponent, 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"] }] });
2602
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2600
+ ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2601
+ ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: ɵEmptyOutletComponent, 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"] }] });
2602
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2603
2603
  type: Component,
2604
2604
  args: [{ template: `<router-outlet></router-outlet>` }]
2605
2605
  }] });
@@ -4383,9 +4383,9 @@ class RouterConfigLoader {
4383
4383
  }));
4384
4384
  }
4385
4385
  }
4386
- RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4387
- RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterConfigLoader });
4388
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterConfigLoader, decorators: [{
4386
+ RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4387
+ RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterConfigLoader });
4388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterConfigLoader, decorators: [{
4389
4389
  type: Injectable
4390
4390
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
4391
4391
 
@@ -4642,10 +4642,11 @@ class Router {
4642
4642
  // Extract URL
4643
4643
  map(t => ({ ...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl) })),
4644
4644
  // Using switchMap so we cancel executing navigations when a new one comes in
4645
- switchMap(t => {
4645
+ switchMap(overallTransitionState => {
4646
4646
  let completed = false;
4647
4647
  let errored = false;
4648
- return of(t).pipe(
4648
+ return of(overallTransitionState)
4649
+ .pipe(
4649
4650
  // Store the Navigation object
4650
4651
  tap(t => {
4651
4652
  this.currentNavigation = {
@@ -4664,8 +4665,8 @@ class Router {
4664
4665
  t.extractedUrl.toString() !== browserUrlTree ||
4665
4666
  // Navigations which succeed or ones which fail and are cleaned up
4666
4667
  // correctly should result in `browserUrlTree` and `currentUrlTree`
4667
- // matching. If this is not the case, assume something went wrong and try
4668
- // processing the URL again.
4668
+ // matching. If this is not the case, assume something went wrong and
4669
+ // try processing the URL again.
4669
4670
  browserUrlTree !== this.currentUrlTree.toString();
4670
4671
  const processCurrentUrl = (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&
4671
4672
  this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);
@@ -4696,11 +4697,13 @@ class Router {
4696
4697
  ...this.currentNavigation,
4697
4698
  finalUrl: t.urlAfterRedirects
4698
4699
  };
4700
+ overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;
4699
4701
  }),
4700
4702
  // Recognize
4701
4703
  recognize(this.ngModule.injector, this.rootComponentType, this.config, this.urlSerializer, this.paramsInheritanceStrategy, this.relativeLinkResolution),
4702
4704
  // Update URL if in `eager` update mode
4703
4705
  tap(t => {
4706
+ overallTransitionState.targetSnapshot = t.targetSnapshot;
4704
4707
  if (this.urlUpdateStrategy === 'eager') {
4705
4708
  if (!t.extras.skipLocationChange) {
4706
4709
  const rawUrl = this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);
@@ -4716,26 +4719,27 @@ class Router {
4716
4719
  else {
4717
4720
  const processPreviousUrl = urlTransition && this.rawUrlTree &&
4718
4721
  this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);
4719
- /* When the current URL shouldn't be processed, but the previous one was,
4720
- * we handle this "error condition" by navigating to the previously
4721
- * successful URL, but leaving the URL intact.*/
4722
+ /* When the current URL shouldn't be processed, but the previous one
4723
+ * was, we handle this "error condition" by navigating to the
4724
+ * previously successful URL, but leaving the URL intact.*/
4722
4725
  if (processPreviousUrl) {
4723
4726
  const { id, extractedUrl, source, restoredState, extras } = t;
4724
4727
  const navStart = new NavigationStart(id, this.serializeUrl(extractedUrl), source, restoredState);
4725
4728
  eventsSubject.next(navStart);
4726
4729
  const targetSnapshot = createEmptyState(extractedUrl, this.rootComponentType).snapshot;
4727
- return of({
4730
+ overallTransitionState = {
4728
4731
  ...t,
4729
4732
  targetSnapshot,
4730
4733
  urlAfterRedirects: extractedUrl,
4731
4734
  extras: { ...extras, skipLocationChange: false, replaceUrl: false },
4732
- });
4735
+ };
4736
+ return of(overallTransitionState);
4733
4737
  }
4734
4738
  else {
4735
- /* When neither the current or previous URL can be processed, do nothing
4736
- * other than update router's internal reference to the current "settled"
4737
- * URL. This way the next navigation will be coming from the current URL
4738
- * in the browser.
4739
+ /* When neither the current or previous URL can be processed, do
4740
+ * nothing other than update router's internal reference to the
4741
+ * current "settled" URL. This way the next navigation will be coming
4742
+ * from the current URL in the browser.
4739
4743
  */
4740
4744
  this.rawUrlTree = t.rawUrl;
4741
4745
  t.resolve(null);
@@ -4747,10 +4751,14 @@ class Router {
4747
4751
  tap(t => {
4748
4752
  const guardsStart = new GuardsCheckStart(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
4749
4753
  this.triggerEvent(guardsStart);
4750
- }), map(t => ({
4751
- ...t,
4752
- guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts)
4753
- })), checkGuards(this.ngModule.injector, (evt) => this.triggerEvent(evt)), tap(t => {
4754
+ }), map(t => {
4755
+ overallTransitionState = {
4756
+ ...t,
4757
+ guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts)
4758
+ };
4759
+ return overallTransitionState;
4760
+ }), checkGuards(this.ngModule.injector, (evt) => this.triggerEvent(evt)), tap(t => {
4761
+ overallTransitionState.guardsResult = t.guardsResult;
4754
4762
  if (isUrlTree(t.guardsResult)) {
4755
4763
  throw redirectingNavigationError(this.urlSerializer, t.guardsResult);
4756
4764
  }
@@ -4810,13 +4818,14 @@ class Router {
4810
4818
  .pipe(defaultIfEmpty(), take(1));
4811
4819
  }), switchTap(() => this.afterPreactivation()), map((t) => {
4812
4820
  const targetRouterState = createRouterState(this.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);
4813
- return ({ ...t, targetRouterState });
4821
+ overallTransitionState = { ...t, targetRouterState };
4822
+ return (overallTransitionState);
4814
4823
  }),
4815
- /* Once here, we are about to activate synchronously. The assumption is this
4816
- will succeed, and user code may read from the Router service. Therefore
4817
- before activation, we need to update router properties storing the current
4818
- URL and the RouterState, as well as updated the browser URL. All this should
4819
- happen *before* activating. */
4824
+ /* Once here, we are about to activate synchronously. The assumption is
4825
+ this will succeed, and user code may read from the Router service.
4826
+ Therefore before activation, we need to update router properties storing
4827
+ the current URL and the RouterState, as well as updated the browser URL.
4828
+ All this should happen *before* activating. */
4820
4829
  tap((t) => {
4821
4830
  this.currentUrlTree = t.urlAfterRedirects;
4822
4831
  this.rawUrlTree =
@@ -4836,81 +4845,75 @@ class Router {
4836
4845
  completed = true;
4837
4846
  }
4838
4847
  }), finalize(() => {
4839
- /* When the navigation stream finishes either through error or success, we
4840
- * set the `completed` or `errored` flag. However, there are some situations
4841
- * where we could get here without either of those being set. For instance, a
4842
- * redirect during NavigationStart. Therefore, this is a catch-all to make
4843
- * sure the NavigationCancel
4844
- * event is fired when a navigation gets cancelled but not caught by other
4845
- * means. */
4848
+ /* When the navigation stream finishes either through error or success,
4849
+ * we set the `completed` or `errored` flag. However, there are some
4850
+ * situations where we could get here without either of those being set.
4851
+ * For instance, a redirect during NavigationStart. Therefore, this is a
4852
+ * catch-all to make sure the NavigationCancel event is fired when a
4853
+ * navigation gets cancelled but not caught by other means. */
4846
4854
  if (!completed && !errored) {
4847
4855
  const cancelationReason = NG_DEV_MODE$1 ?
4848
- `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}` :
4856
+ `Navigation ID ${overallTransitionState
4857
+ .id} is not equal to the current navigation id ${this.navigationId}` :
4849
4858
  '';
4850
- this.cancelNavigationTransition(t, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */);
4859
+ this.cancelNavigationTransition(overallTransitionState, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */);
4851
4860
  }
4852
4861
  // Only clear current navigation if it is still set to the one that
4853
4862
  // finalized.
4854
- if (this.currentNavigation?.id === t.id) {
4863
+ if (this.currentNavigation?.id === overallTransitionState.id) {
4855
4864
  this.currentNavigation = null;
4856
4865
  }
4857
4866
  }), catchError((e) => {
4858
- // TODO(atscott): The NavigationTransition `t` used here does not accurately
4859
- // reflect the current state of the whole transition because some operations
4860
- // return a new object rather than modifying the one in the outermost
4861
- // `switchMap`.
4862
- // The fix can likely be to:
4863
- // 1. Rename the outer `t` variable so it's not shadowed all the time and
4864
- // confusing
4865
- // 2. Keep reassigning to the outer variable after each stage to ensure it
4866
- // gets updated. Or change the implementations to not return a copy.
4867
- // Not changed yet because it affects existing code and would need to be
4868
- // tested more thoroughly.
4869
4867
  errored = true;
4870
4868
  /* This error type is issued during Redirect, and is handled as a
4871
4869
  * cancellation rather than an error. */
4872
4870
  if (isNavigationCancelingError$1(e)) {
4873
4871
  if (!isRedirectingNavigationCancelingError$1(e)) {
4874
- // Set property only if we're not redirecting. If we landed on a page and
4875
- // redirect to `/` route, the new navigation is going to see the `/`
4876
- // isn't a change from the default currentUrlTree and won't navigate.
4877
- // This is only applicable with initial navigation, so setting
4878
- // `navigated` only when not redirecting resolves this scenario.
4872
+ // Set property only if we're not redirecting. If we landed on a page
4873
+ // and redirect to `/` route, the new navigation is going to see the
4874
+ // `/` isn't a change from the default currentUrlTree and won't
4875
+ // navigate. This is only applicable with initial navigation, so
4876
+ // setting `navigated` only when not redirecting resolves this
4877
+ // scenario.
4879
4878
  this.navigated = true;
4880
- this.restoreHistory(t, true);
4879
+ this.restoreHistory(overallTransitionState, true);
4881
4880
  }
4882
- const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message, e.cancellationCode);
4881
+ const navCancel = new NavigationCancel(overallTransitionState.id, this.serializeUrl(overallTransitionState.extractedUrl), e.message, e.cancellationCode);
4883
4882
  eventsSubject.next(navCancel);
4884
4883
  // When redirecting, we need to delay resolving the navigation
4885
4884
  // promise and push it to the redirect navigation
4886
4885
  if (!isRedirectingNavigationCancelingError$1(e)) {
4887
- t.resolve(false);
4886
+ overallTransitionState.resolve(false);
4888
4887
  }
4889
4888
  else {
4890
4889
  const mergedTree = this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);
4891
4890
  const extras = {
4892
- skipLocationChange: t.extras.skipLocationChange,
4891
+ skipLocationChange: overallTransitionState.extras.skipLocationChange,
4893
4892
  // The URL is already updated at this point if we have 'eager' URL
4894
4893
  // updates or if the navigation was triggered by the browser (back
4895
- // button, URL bar, etc). We want to replace that item in history if
4896
- // the navigation is rejected.
4894
+ // button, URL bar, etc). We want to replace that item in history
4895
+ // if the navigation is rejected.
4897
4896
  replaceUrl: this.urlUpdateStrategy === 'eager' ||
4898
- isBrowserTriggeredNavigation(t.source)
4897
+ isBrowserTriggeredNavigation(overallTransitionState.source)
4899
4898
  };
4900
- this.scheduleNavigation(mergedTree, 'imperative', null, extras, { resolve: t.resolve, reject: t.reject, promise: t.promise });
4899
+ this.scheduleNavigation(mergedTree, 'imperative', null, extras, {
4900
+ resolve: overallTransitionState.resolve,
4901
+ reject: overallTransitionState.reject,
4902
+ promise: overallTransitionState.promise
4903
+ });
4901
4904
  }
4902
- /* All other errors should reset to the router's internal URL reference to
4903
- * the pre-error state. */
4905
+ /* All other errors should reset to the router's internal URL reference
4906
+ * to the pre-error state. */
4904
4907
  }
4905
4908
  else {
4906
- this.restoreHistory(t, true);
4907
- const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e, t.targetSnapshot ?? undefined);
4909
+ this.restoreHistory(overallTransitionState, true);
4910
+ const navError = new NavigationError(overallTransitionState.id, this.serializeUrl(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);
4908
4911
  eventsSubject.next(navError);
4909
4912
  try {
4910
- t.resolve(this.errorHandler(e));
4913
+ overallTransitionState.resolve(this.errorHandler(e));
4911
4914
  }
4912
4915
  catch (ee) {
4913
- t.reject(ee);
4916
+ overallTransitionState.reject(ee);
4914
4917
  }
4915
4918
  }
4916
4919
  return EMPTY;
@@ -5362,9 +5365,9 @@ class Router {
5362
5365
  return { navigationId };
5363
5366
  }
5364
5367
  }
5365
- Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5366
- Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: Router });
5367
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: Router, decorators: [{
5368
+ Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5369
+ Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Router });
5370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Router, decorators: [{
5368
5371
  type: Injectable
5369
5372
  }], ctorParameters: function () { return [{ type: i0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: i3.Location }, { type: i0.Injector }, { type: i0.Compiler }, { type: undefined }]; } });
5370
5373
  function validateCommands(commands) {
@@ -5563,9 +5566,9 @@ class RouterLink {
5563
5566
  });
5564
5567
  }
5565
5568
  }
5566
- RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
5567
- RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0-rc.0", type: RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: { queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", routerLink: "routerLink" }, host: { listeners: { "click": "onClick()" } }, usesOnChanges: true, ngImport: i0 });
5568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterLink, decorators: [{
5569
+ RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
5570
+ RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: { queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", routerLink: "routerLink" }, host: { listeners: { "click": "onClick()" } }, usesOnChanges: true, ngImport: i0 });
5571
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLink, decorators: [{
5569
5572
  type: Directive,
5570
5573
  args: [{ selector: ':not(a):not(area)[routerLink]' }]
5571
5574
  }], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: undefined, decorators: [{
@@ -5682,9 +5685,9 @@ class RouterLinkWithHref {
5682
5685
  });
5683
5686
  }
5684
5687
  }
5685
- RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterLinkWithHref, deps: [{ token: Router }, { token: ActivatedRoute }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
5686
- RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0-rc.0", type: RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", 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 });
5687
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterLinkWithHref, decorators: [{
5688
+ RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLinkWithHref, deps: [{ token: Router }, { token: ActivatedRoute }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
5689
+ RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", 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 });
5690
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLinkWithHref, decorators: [{
5688
5691
  type: Directive,
5689
5692
  args: [{ selector: 'a[routerLink],area[routerLink]' }]
5690
5693
  }], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: i3.LocationStrategy }]; }, propDecorators: { target: [{
@@ -5909,9 +5912,9 @@ class RouterLinkActive {
5909
5912
  this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);
5910
5913
  }
5911
5914
  }
5912
- RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", 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 });
5913
- RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0-rc.0", type: RouterLinkActive, 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 });
5914
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterLinkActive, decorators: [{
5915
+ RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", 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 });
5916
+ RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: RouterLinkActive, 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 });
5917
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLinkActive, decorators: [{
5915
5918
  type: Directive,
5916
5919
  args: [{
5917
5920
  selector: '[routerLinkActive]',
@@ -5994,6 +5997,12 @@ class TitleStrategy {
5994
5997
  return snapshot.data[RouteTitle];
5995
5998
  }
5996
5999
  }
6000
+ TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6001
+ TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
6002
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: TitleStrategy, decorators: [{
6003
+ type: Injectable,
6004
+ args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
6005
+ }] });
5997
6006
  /**
5998
6007
  * The default `TitleStrategy` used by the router that updates the title using the `Title` service.
5999
6008
  */
@@ -6014,9 +6023,9 @@ class DefaultTitleStrategy extends TitleStrategy {
6014
6023
  }
6015
6024
  }
6016
6025
  }
6017
- DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
6018
- DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
6019
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
6026
+ DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
6027
+ DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
6028
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
6020
6029
  type: Injectable,
6021
6030
  args: [{ providedIn: 'root' }]
6022
6031
  }], ctorParameters: function () { return [{ type: i1.Title }]; } });
@@ -6053,9 +6062,9 @@ class PreloadAllModules {
6053
6062
  return fn().pipe(catchError(() => of(null)));
6054
6063
  }
6055
6064
  }
6056
- PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6057
- PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6058
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: PreloadAllModules, decorators: [{
6065
+ PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6066
+ PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: PreloadAllModules, decorators: [{
6059
6068
  type: Injectable,
6060
6069
  args: [{ providedIn: 'root' }]
6061
6070
  }] });
@@ -6073,9 +6082,9 @@ class NoPreloading {
6073
6082
  return of(null);
6074
6083
  }
6075
6084
  }
6076
- NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6077
- NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6078
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: NoPreloading, decorators: [{
6085
+ NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6086
+ NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6087
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: NoPreloading, decorators: [{
6079
6088
  type: Injectable,
6080
6089
  args: [{ providedIn: 'root' }]
6081
6090
  }] });
@@ -6161,9 +6170,9 @@ class RouterPreloader {
6161
6170
  });
6162
6171
  }
6163
6172
  }
6164
- RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6165
- RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterPreloader });
6166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterPreloader, decorators: [{
6173
+ RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6174
+ RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterPreloader });
6175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterPreloader, decorators: [{
6167
6176
  type: Injectable
6168
6177
  }], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
6169
6178
 
@@ -6250,9 +6259,9 @@ class RouterScroller {
6250
6259
  }
6251
6260
  }
6252
6261
  }
6253
- RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6254
- RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterScroller });
6255
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterScroller, decorators: [{
6262
+ RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6263
+ RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterScroller });
6264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterScroller, decorators: [{
6256
6265
  type: Injectable
6257
6266
  }], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: undefined }]; } });
6258
6267
 
@@ -6289,9 +6298,9 @@ const ROUTER_PROVIDERS = [
6289
6298
  provide: Router,
6290
6299
  useFactory: setupRouter,
6291
6300
  deps: [
6292
- UrlSerializer, ChildrenOutletContexts, Location, Injector, Compiler, ROUTES,
6293
- ROUTER_CONFIGURATION, DefaultTitleStrategy, [TitleStrategy, new Optional()],
6294
- [UrlHandlingStrategy, new Optional()], [RouteReuseStrategy, new Optional()]
6301
+ UrlSerializer, ChildrenOutletContexts, Location, Injector, Compiler, ROUTES, TitleStrategy,
6302
+ ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],
6303
+ [RouteReuseStrategy, new Optional()]
6295
6304
  ]
6296
6305
  },
6297
6306
  ChildrenOutletContexts,
@@ -6385,10 +6394,10 @@ class RouterModule {
6385
6394
  return { ngModule: RouterModule, providers: [provideRoutes(routes)] };
6386
6395
  }
6387
6396
  }
6388
- RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
6389
- RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterModule, declarations: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] });
6390
- RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterModule });
6391
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterModule, decorators: [{
6397
+ RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
6398
+ RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.0", ngImport: i0, type: RouterModule, declarations: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] });
6399
+ RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterModule });
6400
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterModule, decorators: [{
6392
6401
  type: NgModule,
6393
6402
  args: [{
6394
6403
  declarations: ROUTER_DIRECTIVES,
@@ -6450,7 +6459,7 @@ function provideRoutes(routes) {
6450
6459
  { provide: ROUTES, multi: true, useValue: routes },
6451
6460
  ];
6452
6461
  }
6453
- function setupRouter(urlSerializer, contexts, location, injector, compiler, config, opts = {}, defaultTitleStrategy, titleStrategy, urlHandlingStrategy, routeReuseStrategy) {
6462
+ function setupRouter(urlSerializer, contexts, location, injector, compiler, config, titleStrategy, opts = {}, urlHandlingStrategy, routeReuseStrategy) {
6454
6463
  const router = new Router(null, urlSerializer, contexts, location, injector, compiler, flatten(config));
6455
6464
  if (urlHandlingStrategy) {
6456
6465
  router.urlHandlingStrategy = urlHandlingStrategy;
@@ -6458,7 +6467,7 @@ function setupRouter(urlSerializer, contexts, location, injector, compiler, conf
6458
6467
  if (routeReuseStrategy) {
6459
6468
  router.routeReuseStrategy = routeReuseStrategy;
6460
6469
  }
6461
- router.titleStrategy = titleStrategy ?? defaultTitleStrategy;
6470
+ router.titleStrategy = titleStrategy;
6462
6471
  assignExtraOptionsToRouter(opts, router);
6463
6472
  return router;
6464
6473
  }
@@ -6664,7 +6673,7 @@ function providePreloading(preloadingStrategy) {
6664
6673
  /**
6665
6674
  * @publicApi
6666
6675
  */
6667
- const VERSION = new Version('14.1.0-rc.0');
6676
+ const VERSION = new Version('14.1.0');
6668
6677
 
6669
6678
  /**
6670
6679
  * @license