@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 { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, last as last$1, takeWhile, defaultIfEmpty, takeLast, mapTo, finalize, refCount, mergeAll } from 'rxjs/operators';
11
11
  import * as i3 from '@angular/common';
@@ -2543,9 +2543,9 @@ class RouterOutlet {
2543
2543
  this.activateEvents.emit(this.activated.instance);
2544
2544
  }
2545
2545
  }
2546
- 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 });
2547
- 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 });
2548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterOutlet, decorators: [{
2546
+ 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 });
2547
+ 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 });
2548
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterOutlet, decorators: [{
2549
2549
  type: Directive,
2550
2550
  args: [{ selector: 'router-outlet', exportAs: 'outlet' }]
2551
2551
  }], ctorParameters: function () {
@@ -2604,9 +2604,9 @@ function isComponentFactoryResolver(item) {
2604
2604
  */
2605
2605
  class ɵEmptyOutletComponent {
2606
2606
  }
2607
- ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2608
- ɵ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"] }] });
2609
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2607
+ ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2608
+ ɵ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"] }] });
2609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2610
2610
  type: Component,
2611
2611
  args: [{ template: `<router-outlet></router-outlet>` }]
2612
2612
  }] });
@@ -4402,9 +4402,9 @@ class RouterConfigLoader {
4402
4402
  }));
4403
4403
  }
4404
4404
  }
4405
- 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 });
4406
- RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterConfigLoader });
4407
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterConfigLoader, decorators: [{
4405
+ 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 });
4406
+ RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterConfigLoader });
4407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterConfigLoader, decorators: [{
4408
4408
  type: Injectable
4409
4409
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
4410
4410
 
@@ -4655,10 +4655,11 @@ class Router {
4655
4655
  // Extract URL
4656
4656
  map(t => (Object.assign(Object.assign({}, t), { extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl) }))),
4657
4657
  // Using switchMap so we cancel executing navigations when a new one comes in
4658
- switchMap(t => {
4658
+ switchMap(overallTransitionState => {
4659
4659
  let completed = false;
4660
4660
  let errored = false;
4661
- return of(t).pipe(
4661
+ return of(overallTransitionState)
4662
+ .pipe(
4662
4663
  // Store the Navigation object
4663
4664
  tap(t => {
4664
4665
  this.currentNavigation = {
@@ -4676,8 +4677,8 @@ class Router {
4676
4677
  t.extractedUrl.toString() !== browserUrlTree ||
4677
4678
  // Navigations which succeed or ones which fail and are cleaned up
4678
4679
  // correctly should result in `browserUrlTree` and `currentUrlTree`
4679
- // matching. If this is not the case, assume something went wrong and try
4680
- // processing the URL again.
4680
+ // matching. If this is not the case, assume something went wrong and
4681
+ // try processing the URL again.
4681
4682
  browserUrlTree !== this.currentUrlTree.toString();
4682
4683
  const processCurrentUrl = (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&
4683
4684
  this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);
@@ -4705,11 +4706,13 @@ class Router {
4705
4706
  // `urlAfterRedirects` is guaranteed to be set after this point
4706
4707
  tap(t => {
4707
4708
  this.currentNavigation = Object.assign(Object.assign({}, this.currentNavigation), { finalUrl: t.urlAfterRedirects });
4709
+ overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;
4708
4710
  }),
4709
4711
  // Recognize
4710
4712
  recognize(this.ngModule.injector, this.rootComponentType, this.config, this.urlSerializer, this.paramsInheritanceStrategy, this.relativeLinkResolution),
4711
4713
  // Update URL if in `eager` update mode
4712
4714
  tap(t => {
4715
+ overallTransitionState.targetSnapshot = t.targetSnapshot;
4713
4716
  if (this.urlUpdateStrategy === 'eager') {
4714
4717
  if (!t.extras.skipLocationChange) {
4715
4718
  const rawUrl = this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);
@@ -4725,21 +4728,22 @@ class Router {
4725
4728
  else {
4726
4729
  const processPreviousUrl = urlTransition && this.rawUrlTree &&
4727
4730
  this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);
4728
- /* When the current URL shouldn't be processed, but the previous one was,
4729
- * we handle this "error condition" by navigating to the previously
4730
- * successful URL, but leaving the URL intact.*/
4731
+ /* When the current URL shouldn't be processed, but the previous one
4732
+ * was, we handle this "error condition" by navigating to the
4733
+ * previously successful URL, but leaving the URL intact.*/
4731
4734
  if (processPreviousUrl) {
4732
4735
  const { id, extractedUrl, source, restoredState, extras } = t;
4733
4736
  const navStart = new NavigationStart(id, this.serializeUrl(extractedUrl), source, restoredState);
4734
4737
  eventsSubject.next(navStart);
4735
4738
  const targetSnapshot = createEmptyState(extractedUrl, this.rootComponentType).snapshot;
4736
- return of(Object.assign(Object.assign({}, t), { targetSnapshot, urlAfterRedirects: extractedUrl, extras: Object.assign(Object.assign({}, extras), { skipLocationChange: false, replaceUrl: false }) }));
4739
+ overallTransitionState = Object.assign(Object.assign({}, t), { targetSnapshot, urlAfterRedirects: extractedUrl, extras: Object.assign(Object.assign({}, extras), { skipLocationChange: false, replaceUrl: false }) });
4740
+ return of(overallTransitionState);
4737
4741
  }
4738
4742
  else {
4739
- /* When neither the current or previous URL can be processed, do nothing
4740
- * other than update router's internal reference to the current "settled"
4741
- * URL. This way the next navigation will be coming from the current URL
4742
- * in the browser.
4743
+ /* When neither the current or previous URL can be processed, do
4744
+ * nothing other than update router's internal reference to the
4745
+ * current "settled" URL. This way the next navigation will be coming
4746
+ * from the current URL in the browser.
4743
4747
  */
4744
4748
  this.rawUrlTree = t.rawUrl;
4745
4749
  t.resolve(null);
@@ -4751,7 +4755,11 @@ class Router {
4751
4755
  tap(t => {
4752
4756
  const guardsStart = new GuardsCheckStart(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
4753
4757
  this.triggerEvent(guardsStart);
4754
- }), map(t => (Object.assign(Object.assign({}, t), { guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts) }))), checkGuards(this.ngModule.injector, (evt) => this.triggerEvent(evt)), tap(t => {
4758
+ }), map(t => {
4759
+ overallTransitionState = Object.assign(Object.assign({}, t), { guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts) });
4760
+ return overallTransitionState;
4761
+ }), checkGuards(this.ngModule.injector, (evt) => this.triggerEvent(evt)), tap(t => {
4762
+ overallTransitionState.guardsResult = t.guardsResult;
4755
4763
  if (isUrlTree(t.guardsResult)) {
4756
4764
  throw redirectingNavigationError(this.urlSerializer, t.guardsResult);
4757
4765
  }
@@ -4812,13 +4820,14 @@ class Router {
4812
4820
  .pipe(defaultIfEmpty(), take(1));
4813
4821
  }), switchTap(() => this.afterPreactivation()), map((t) => {
4814
4822
  const targetRouterState = createRouterState(this.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);
4815
- return (Object.assign(Object.assign({}, t), { targetRouterState }));
4823
+ overallTransitionState = Object.assign(Object.assign({}, t), { targetRouterState });
4824
+ return (overallTransitionState);
4816
4825
  }),
4817
- /* Once here, we are about to activate synchronously. The assumption is this
4818
- will succeed, and user code may read from the Router service. Therefore
4819
- before activation, we need to update router properties storing the current
4820
- URL and the RouterState, as well as updated the browser URL. All this should
4821
- happen *before* activating. */
4826
+ /* Once here, we are about to activate synchronously. The assumption is
4827
+ this will succeed, and user code may read from the Router service.
4828
+ Therefore before activation, we need to update router properties storing
4829
+ the current URL and the RouterState, as well as updated the browser URL.
4830
+ All this should happen *before* activating. */
4822
4831
  tap((t) => {
4823
4832
  this.currentUrlTree = t.urlAfterRedirects;
4824
4833
  this.rawUrlTree =
@@ -4839,82 +4848,76 @@ class Router {
4839
4848
  }
4840
4849
  }), finalize(() => {
4841
4850
  var _a;
4842
- /* When the navigation stream finishes either through error or success, we
4843
- * set the `completed` or `errored` flag. However, there are some situations
4844
- * where we could get here without either of those being set. For instance, a
4845
- * redirect during NavigationStart. Therefore, this is a catch-all to make
4846
- * sure the NavigationCancel
4847
- * event is fired when a navigation gets cancelled but not caught by other
4848
- * means. */
4851
+ /* When the navigation stream finishes either through error or success,
4852
+ * we set the `completed` or `errored` flag. However, there are some
4853
+ * situations where we could get here without either of those being set.
4854
+ * For instance, a redirect during NavigationStart. Therefore, this is a
4855
+ * catch-all to make sure the NavigationCancel event is fired when a
4856
+ * navigation gets cancelled but not caught by other means. */
4849
4857
  if (!completed && !errored) {
4850
4858
  const cancelationReason = NG_DEV_MODE$1 ?
4851
- `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}` :
4859
+ `Navigation ID ${overallTransitionState
4860
+ .id} is not equal to the current navigation id ${this.navigationId}` :
4852
4861
  '';
4853
- this.cancelNavigationTransition(t, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */);
4862
+ this.cancelNavigationTransition(overallTransitionState, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */);
4854
4863
  }
4855
4864
  // Only clear current navigation if it is still set to the one that
4856
4865
  // finalized.
4857
- if (((_a = this.currentNavigation) === null || _a === void 0 ? void 0 : _a.id) === t.id) {
4866
+ if (((_a = this.currentNavigation) === null || _a === void 0 ? void 0 : _a.id) === overallTransitionState.id) {
4858
4867
  this.currentNavigation = null;
4859
4868
  }
4860
4869
  }), catchError((e) => {
4861
4870
  var _a;
4862
- // TODO(atscott): The NavigationTransition `t` used here does not accurately
4863
- // reflect the current state of the whole transition because some operations
4864
- // return a new object rather than modifying the one in the outermost
4865
- // `switchMap`.
4866
- // The fix can likely be to:
4867
- // 1. Rename the outer `t` variable so it's not shadowed all the time and
4868
- // confusing
4869
- // 2. Keep reassigning to the outer variable after each stage to ensure it
4870
- // gets updated. Or change the implementations to not return a copy.
4871
- // Not changed yet because it affects existing code and would need to be
4872
- // tested more thoroughly.
4873
4871
  errored = true;
4874
4872
  /* This error type is issued during Redirect, and is handled as a
4875
4873
  * cancellation rather than an error. */
4876
4874
  if (isNavigationCancelingError$1(e)) {
4877
4875
  if (!isRedirectingNavigationCancelingError$1(e)) {
4878
- // Set property only if we're not redirecting. If we landed on a page and
4879
- // redirect to `/` route, the new navigation is going to see the `/`
4880
- // isn't a change from the default currentUrlTree and won't navigate.
4881
- // This is only applicable with initial navigation, so setting
4882
- // `navigated` only when not redirecting resolves this scenario.
4876
+ // Set property only if we're not redirecting. If we landed on a page
4877
+ // and redirect to `/` route, the new navigation is going to see the
4878
+ // `/` isn't a change from the default currentUrlTree and won't
4879
+ // navigate. This is only applicable with initial navigation, so
4880
+ // setting `navigated` only when not redirecting resolves this
4881
+ // scenario.
4883
4882
  this.navigated = true;
4884
- this.restoreHistory(t, true);
4883
+ this.restoreHistory(overallTransitionState, true);
4885
4884
  }
4886
- const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message, e.cancellationCode);
4885
+ const navCancel = new NavigationCancel(overallTransitionState.id, this.serializeUrl(overallTransitionState.extractedUrl), e.message, e.cancellationCode);
4887
4886
  eventsSubject.next(navCancel);
4888
4887
  // When redirecting, we need to delay resolving the navigation
4889
4888
  // promise and push it to the redirect navigation
4890
4889
  if (!isRedirectingNavigationCancelingError$1(e)) {
4891
- t.resolve(false);
4890
+ overallTransitionState.resolve(false);
4892
4891
  }
4893
4892
  else {
4894
4893
  const mergedTree = this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);
4895
4894
  const extras = {
4896
- skipLocationChange: t.extras.skipLocationChange,
4895
+ skipLocationChange: overallTransitionState.extras.skipLocationChange,
4897
4896
  // The URL is already updated at this point if we have 'eager' URL
4898
4897
  // updates or if the navigation was triggered by the browser (back
4899
- // button, URL bar, etc). We want to replace that item in history if
4900
- // the navigation is rejected.
4898
+ // button, URL bar, etc). We want to replace that item in history
4899
+ // if the navigation is rejected.
4901
4900
  replaceUrl: this.urlUpdateStrategy === 'eager' ||
4902
- isBrowserTriggeredNavigation(t.source)
4901
+ isBrowserTriggeredNavigation(overallTransitionState.source)
4903
4902
  };
4904
- this.scheduleNavigation(mergedTree, 'imperative', null, extras, { resolve: t.resolve, reject: t.reject, promise: t.promise });
4903
+ this.scheduleNavigation(mergedTree, 'imperative', null, extras, {
4904
+ resolve: overallTransitionState.resolve,
4905
+ reject: overallTransitionState.reject,
4906
+ promise: overallTransitionState.promise
4907
+ });
4905
4908
  }
4906
- /* All other errors should reset to the router's internal URL reference to
4907
- * the pre-error state. */
4909
+ /* All other errors should reset to the router's internal URL reference
4910
+ * to the pre-error state. */
4908
4911
  }
4909
4912
  else {
4910
- this.restoreHistory(t, true);
4911
- const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e, (_a = t.targetSnapshot) !== null && _a !== void 0 ? _a : undefined);
4913
+ this.restoreHistory(overallTransitionState, true);
4914
+ const navError = new NavigationError(overallTransitionState.id, this.serializeUrl(overallTransitionState.extractedUrl), e, (_a = overallTransitionState.targetSnapshot) !== null && _a !== void 0 ? _a : undefined);
4912
4915
  eventsSubject.next(navError);
4913
4916
  try {
4914
- t.resolve(this.errorHandler(e));
4917
+ overallTransitionState.resolve(this.errorHandler(e));
4915
4918
  }
4916
4919
  catch (ee) {
4917
- t.reject(ee);
4920
+ overallTransitionState.reject(ee);
4918
4921
  }
4919
4922
  }
4920
4923
  return EMPTY;
@@ -5370,9 +5373,9 @@ class Router {
5370
5373
  return { navigationId };
5371
5374
  }
5372
5375
  }
5373
- Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5374
- Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: Router });
5375
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: Router, decorators: [{
5376
+ Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5377
+ Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Router });
5378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: Router, decorators: [{
5376
5379
  type: Injectable
5377
5380
  }], ctorParameters: function () { return [{ type: i0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: i3.Location }, { type: i0.Injector }, { type: i0.Compiler }, { type: undefined }]; } });
5378
5381
  function validateCommands(commands) {
@@ -5564,9 +5567,9 @@ class RouterLink {
5564
5567
  });
5565
5568
  }
5566
5569
  }
5567
- 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 });
5568
- 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 });
5569
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterLink, decorators: [{
5570
+ 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 });
5571
+ 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 });
5572
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLink, decorators: [{
5570
5573
  type: Directive,
5571
5574
  args: [{ selector: ':not(a):not(area)[routerLink]' }]
5572
5575
  }], ctorParameters: function () {
@@ -5685,9 +5688,9 @@ class RouterLinkWithHref {
5685
5688
  });
5686
5689
  }
5687
5690
  }
5688
- 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 });
5689
- 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 });
5690
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterLinkWithHref, decorators: [{
5691
+ 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 });
5692
+ 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 });
5693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLinkWithHref, decorators: [{
5691
5694
  type: Directive,
5692
5695
  args: [{ selector: 'a[routerLink],area[routerLink]' }]
5693
5696
  }], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: i3.LocationStrategy }]; }, propDecorators: { target: [{
@@ -5914,9 +5917,9 @@ class RouterLinkActive {
5914
5917
  this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);
5915
5918
  }
5916
5919
  }
5917
- 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 });
5918
- 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 });
5919
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterLinkActive, decorators: [{
5920
+ 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 });
5921
+ 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 });
5922
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterLinkActive, decorators: [{
5920
5923
  type: Directive,
5921
5924
  args: [{
5922
5925
  selector: '[routerLinkActive]',
@@ -6002,6 +6005,12 @@ class TitleStrategy {
6002
6005
  return snapshot.data[RouteTitle];
6003
6006
  }
6004
6007
  }
6008
+ TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6009
+ TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
6010
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: TitleStrategy, decorators: [{
6011
+ type: Injectable,
6012
+ args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
6013
+ }] });
6005
6014
  /**
6006
6015
  * The default `TitleStrategy` used by the router that updates the title using the `Title` service.
6007
6016
  */
@@ -6022,9 +6031,9 @@ class DefaultTitleStrategy extends TitleStrategy {
6022
6031
  }
6023
6032
  }
6024
6033
  }
6025
- 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 });
6026
- DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
6027
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
6034
+ DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
6035
+ DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
6036
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
6028
6037
  type: Injectable,
6029
6038
  args: [{ providedIn: 'root' }]
6030
6039
  }], ctorParameters: function () { return [{ type: i1.Title }]; } });
@@ -6061,9 +6070,9 @@ class PreloadAllModules {
6061
6070
  return fn().pipe(catchError(() => of(null)));
6062
6071
  }
6063
6072
  }
6064
- PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6065
- PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6066
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: PreloadAllModules, decorators: [{
6073
+ PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6074
+ PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6075
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: PreloadAllModules, decorators: [{
6067
6076
  type: Injectable,
6068
6077
  args: [{ providedIn: 'root' }]
6069
6078
  }] });
@@ -6081,9 +6090,9 @@ class NoPreloading {
6081
6090
  return of(null);
6082
6091
  }
6083
6092
  }
6084
- NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6085
- NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6086
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: NoPreloading, decorators: [{
6093
+ NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6094
+ NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6095
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: NoPreloading, decorators: [{
6087
6096
  type: Injectable,
6088
6097
  args: [{ providedIn: 'root' }]
6089
6098
  }] });
@@ -6171,9 +6180,9 @@ class RouterPreloader {
6171
6180
  });
6172
6181
  }
6173
6182
  }
6174
- 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 });
6175
- RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterPreloader });
6176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterPreloader, decorators: [{
6183
+ 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 });
6184
+ RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterPreloader });
6185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterPreloader, decorators: [{
6177
6186
  type: Injectable
6178
6187
  }], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
6179
6188
 
@@ -6253,9 +6262,9 @@ class RouterScroller {
6253
6262
  }
6254
6263
  }
6255
6264
  }
6256
- RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6257
- RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterScroller });
6258
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterScroller, decorators: [{
6265
+ RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6266
+ RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterScroller });
6267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterScroller, decorators: [{
6259
6268
  type: Injectable
6260
6269
  }], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: undefined }]; } });
6261
6270
 
@@ -6292,9 +6301,9 @@ const ROUTER_PROVIDERS = [
6292
6301
  provide: Router,
6293
6302
  useFactory: setupRouter,
6294
6303
  deps: [
6295
- UrlSerializer, ChildrenOutletContexts, Location, Injector, Compiler, ROUTES,
6296
- ROUTER_CONFIGURATION, DefaultTitleStrategy, [TitleStrategy, new Optional()],
6297
- [UrlHandlingStrategy, new Optional()], [RouteReuseStrategy, new Optional()]
6304
+ UrlSerializer, ChildrenOutletContexts, Location, Injector, Compiler, ROUTES, TitleStrategy,
6305
+ ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],
6306
+ [RouteReuseStrategy, new Optional()]
6298
6307
  ]
6299
6308
  },
6300
6309
  ChildrenOutletContexts,
@@ -6388,10 +6397,10 @@ class RouterModule {
6388
6397
  return { ngModule: RouterModule, providers: [provideRoutes(routes)] };
6389
6398
  }
6390
6399
  }
6391
- 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 });
6392
- 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] });
6393
- RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterModule });
6394
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0-rc.0", ngImport: i0, type: RouterModule, decorators: [{
6400
+ 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 });
6401
+ 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] });
6402
+ RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterModule });
6403
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RouterModule, decorators: [{
6395
6404
  type: NgModule,
6396
6405
  args: [{
6397
6406
  declarations: ROUTER_DIRECTIVES,
@@ -6455,7 +6464,7 @@ function provideRoutes(routes) {
6455
6464
  { provide: ROUTES, multi: true, useValue: routes },
6456
6465
  ];
6457
6466
  }
6458
- function setupRouter(urlSerializer, contexts, location, injector, compiler, config, opts = {}, defaultTitleStrategy, titleStrategy, urlHandlingStrategy, routeReuseStrategy) {
6467
+ function setupRouter(urlSerializer, contexts, location, injector, compiler, config, titleStrategy, opts = {}, urlHandlingStrategy, routeReuseStrategy) {
6459
6468
  const router = new Router(null, urlSerializer, contexts, location, injector, compiler, flatten(config));
6460
6469
  if (urlHandlingStrategy) {
6461
6470
  router.urlHandlingStrategy = urlHandlingStrategy;
@@ -6463,7 +6472,7 @@ function setupRouter(urlSerializer, contexts, location, injector, compiler, conf
6463
6472
  if (routeReuseStrategy) {
6464
6473
  router.routeReuseStrategy = routeReuseStrategy;
6465
6474
  }
6466
- router.titleStrategy = titleStrategy !== null && titleStrategy !== void 0 ? titleStrategy : defaultTitleStrategy;
6475
+ router.titleStrategy = titleStrategy;
6467
6476
  assignExtraOptionsToRouter(opts, router);
6468
6477
  return router;
6469
6478
  }
@@ -6671,7 +6680,7 @@ function providePreloading(preloadingStrategy) {
6671
6680
  /**
6672
6681
  * @publicApi
6673
6682
  */
6674
- const VERSION = new Version('14.1.0-rc.0');
6683
+ const VERSION = new Version('14.1.0');
6675
6684
 
6676
6685
  /**
6677
6686
  * @license