@angular/router 21.2.1 → 22.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.1
2
+ * @license Angular v22.0.0-next.1
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -7,7 +7,7 @@
7
7
  import * as i3 from '@angular/common';
8
8
  import { ViewportScroller, PlatformNavigation, PlatformLocation, ɵPRECOMMIT_HANDLER_SUPPORTED as _PRECOMMIT_HANDLER_SUPPORTED, Location, ɵNavigationAdapterForLocation as _NavigationAdapterForLocation, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';
9
9
  import * as i0 from '@angular/core';
10
- import { inject, signal, Injectable, HostAttributeToken, linkedSignal, untracked, ɵINTERNAL_APPLICATION_ERROR_HANDLER as _INTERNAL_APPLICATION_ERROR_HANDLER, effect, ɵRuntimeError as _RuntimeError, computed, booleanAttribute, Directive, Attribute, Input, HostListener, EventEmitter, ContentChildren, Output, createEnvironmentInjector, InjectionToken, NgZone, EnvironmentInjector, DestroyRef, afterNextRender, ɵpromiseWithResolvers as _promiseWithResolvers, ɵpublishExternalGlobalUtil as _publishExternalGlobalUtil, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, provideEnvironmentInitializer, Injector, ApplicationRef, ɵIS_ENABLED_BLOCKING_INITIAL_NAVIGATION as _IS_ENABLED_BLOCKING_INITIAL_NAVIGATION, provideAppInitializer, ɵperformanceMarkFeature as _performanceMarkFeature, ENVIRONMENT_INITIALIZER, NgModule } from '@angular/core';
10
+ import { inject, signal, Injectable, HostAttributeToken, linkedSignal, untracked, input, ɵINTERNAL_APPLICATION_ERROR_HANDLER as _INTERNAL_APPLICATION_ERROR_HANDLER, effect, ɵRuntimeError as _RuntimeError, computed, booleanAttribute, Directive, Attribute, Input, HostListener, EventEmitter, ContentChildren, Output, createEnvironmentInjector, InjectionToken, NgZone, EnvironmentInjector, DestroyRef, afterNextRender, ɵpromiseWithResolvers as _promiseWithResolvers, ɵpublishExternalGlobalUtil as _publishExternalGlobalUtil, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, provideEnvironmentInitializer, Injector, ApplicationRef, ɵIS_ENABLED_BLOCKING_INITIAL_NAVIGATION as _IS_ENABLED_BLOCKING_INITIAL_NAVIGATION, provideAppInitializer, ɵperformanceMarkFeature as _performanceMarkFeature, ENVIRONMENT_INITIALIZER, NgModule } from '@angular/core';
11
11
  import { Router, StateManager, UrlSerializer, NavigationEnd, UrlTree, ROUTER_CONFIGURATION, isUrlTree, ActivatedRoute, isActive, exactMatchOptions, subsetMatchOptions, RouterConfigLoader, IMPERATIVE_NAVIGATION, NavigationTransitions, NavigationStart, NavigationSkipped, NavigationSkippedCode, Scroll, BeforeRoutesRecognized, BeforeActivateRoutes, NavigationCancel, NavigationError, isRedirectingEvent, NavigationCancellationCode, ROUTES, afterNextNavigation, ROUTE_INJECTOR_CLEANUP, routeInjectorCleanup, stringifyEvent, NAVIGATION_ERROR_HANDLER, RoutedComponentInputBinder, INPUT_BINDER, CREATE_VIEW_TRANSITION, createViewTransition, VIEW_TRANSITION_OPTIONS, DefaultUrlSerializer, ChildrenOutletContexts, RouterOutlet, ɵEmptyOutletComponent as _EmptyOutletComponent } from './_router-chunk.mjs';
12
12
  import { Subject, of, from } from 'rxjs';
13
13
  import { mergeAll, catchError, filter, concatMap, mergeMap } from 'rxjs/operators';
@@ -45,7 +45,7 @@ class ReactiveRouterState {
45
45
  }
46
46
  static ɵfac = i0.ɵɵngDeclareFactory({
47
47
  minVersion: "12.0.0",
48
- version: "21.2.1",
48
+ version: "22.0.0-next.1",
49
49
  ngImport: i0,
50
50
  type: ReactiveRouterState,
51
51
  deps: [],
@@ -53,7 +53,7 @@ class ReactiveRouterState {
53
53
  });
54
54
  static ɵprov = i0.ɵɵngDeclareInjectable({
55
55
  minVersion: "12.0.0",
56
- version: "21.2.1",
56
+ version: "22.0.0-next.1",
57
57
  ngImport: i0,
58
58
  type: ReactiveRouterState,
59
59
  providedIn: 'root'
@@ -61,7 +61,7 @@ class ReactiveRouterState {
61
61
  }
62
62
  i0.ɵɵngDeclareClassMetadata({
63
63
  minVersion: "12.0.0",
64
- version: "21.2.1",
64
+ version: "22.0.0-next.1",
65
65
  ngImport: i0,
66
66
  type: ReactiveRouterState,
67
67
  decorators: [{
@@ -195,6 +195,9 @@ class RouterLink {
195
195
  _replaceUrl = signal(false, ...(ngDevMode ? [{
196
196
  debugName: "_replaceUrl"
197
197
  }] : []));
198
+ browserUrl = input(undefined, ...(ngDevMode ? [{
199
+ debugName: "browserUrl"
200
+ }] : []));
198
201
  isAnchorElement;
199
202
  onChanges = new Subject();
200
203
  applicationErrorHandler = inject(_INTERNAL_APPLICATION_ERROR_HANDLER);
@@ -257,11 +260,15 @@ class RouterLink {
257
260
  return true;
258
261
  }
259
262
  }
263
+ const browserUrl = this.browserUrl();
260
264
  const extras = {
261
265
  skipLocationChange: this.skipLocationChange,
262
266
  replaceUrl: this.replaceUrl,
263
267
  state: this.state,
264
- info: this.info
268
+ info: this.info,
269
+ ...(browserUrl !== undefined && {
270
+ browserUrl
271
+ })
265
272
  };
266
273
  this.router.navigateByUrl(urlTree, extras)?.catch(e => {
267
274
  this.applicationErrorHandler(e);
@@ -314,7 +321,7 @@ class RouterLink {
314
321
  }
315
322
  static ɵfac = i0.ɵɵngDeclareFactory({
316
323
  minVersion: "12.0.0",
317
- version: "21.2.1",
324
+ version: "22.0.0-next.1",
318
325
  ngImport: i0,
319
326
  type: RouterLink,
320
327
  deps: [{
@@ -334,23 +341,96 @@ class RouterLink {
334
341
  target: i0.ɵɵFactoryTarget.Directive
335
342
  });
336
343
  static ɵdir = i0.ɵɵngDeclareDirective({
337
- minVersion: "16.1.0",
338
- version: "21.2.1",
344
+ minVersion: "17.1.0",
345
+ version: "22.0.0-next.1",
339
346
  type: RouterLink,
340
347
  isStandalone: true,
341
348
  selector: "[routerLink]",
342
349
  inputs: {
343
- target: "target",
344
- queryParams: "queryParams",
345
- fragment: "fragment",
346
- queryParamsHandling: "queryParamsHandling",
347
- state: "state",
348
- info: "info",
349
- relativeTo: "relativeTo",
350
- preserveFragment: ["preserveFragment", "preserveFragment", booleanAttribute],
351
- skipLocationChange: ["skipLocationChange", "skipLocationChange", booleanAttribute],
352
- replaceUrl: ["replaceUrl", "replaceUrl", booleanAttribute],
353
- routerLink: "routerLink"
350
+ target: {
351
+ classPropertyName: "target",
352
+ publicName: "target",
353
+ isSignal: false,
354
+ isRequired: false,
355
+ transformFunction: null
356
+ },
357
+ queryParams: {
358
+ classPropertyName: "queryParams",
359
+ publicName: "queryParams",
360
+ isSignal: false,
361
+ isRequired: false,
362
+ transformFunction: null
363
+ },
364
+ fragment: {
365
+ classPropertyName: "fragment",
366
+ publicName: "fragment",
367
+ isSignal: false,
368
+ isRequired: false,
369
+ transformFunction: null
370
+ },
371
+ queryParamsHandling: {
372
+ classPropertyName: "queryParamsHandling",
373
+ publicName: "queryParamsHandling",
374
+ isSignal: false,
375
+ isRequired: false,
376
+ transformFunction: null
377
+ },
378
+ state: {
379
+ classPropertyName: "state",
380
+ publicName: "state",
381
+ isSignal: false,
382
+ isRequired: false,
383
+ transformFunction: null
384
+ },
385
+ info: {
386
+ classPropertyName: "info",
387
+ publicName: "info",
388
+ isSignal: false,
389
+ isRequired: false,
390
+ transformFunction: null
391
+ },
392
+ relativeTo: {
393
+ classPropertyName: "relativeTo",
394
+ publicName: "relativeTo",
395
+ isSignal: false,
396
+ isRequired: false,
397
+ transformFunction: null
398
+ },
399
+ preserveFragment: {
400
+ classPropertyName: "preserveFragment",
401
+ publicName: "preserveFragment",
402
+ isSignal: false,
403
+ isRequired: false,
404
+ transformFunction: booleanAttribute
405
+ },
406
+ skipLocationChange: {
407
+ classPropertyName: "skipLocationChange",
408
+ publicName: "skipLocationChange",
409
+ isSignal: false,
410
+ isRequired: false,
411
+ transformFunction: booleanAttribute
412
+ },
413
+ replaceUrl: {
414
+ classPropertyName: "replaceUrl",
415
+ publicName: "replaceUrl",
416
+ isSignal: false,
417
+ isRequired: false,
418
+ transformFunction: booleanAttribute
419
+ },
420
+ browserUrl: {
421
+ classPropertyName: "browserUrl",
422
+ publicName: "browserUrl",
423
+ isSignal: true,
424
+ isRequired: false,
425
+ transformFunction: null
426
+ },
427
+ routerLink: {
428
+ classPropertyName: "routerLink",
429
+ publicName: "routerLink",
430
+ isSignal: false,
431
+ isRequired: false,
432
+ transformFunction: null
433
+ }
354
434
  },
355
435
  host: {
356
436
  listeners: {
@@ -367,7 +447,7 @@ class RouterLink {
367
447
  }
368
448
  i0.ɵɵngDeclareClassMetadata({
369
449
  minVersion: "12.0.0",
370
- version: "21.2.1",
450
+ version: "22.0.0-next.1",
371
451
  ngImport: i0,
372
452
  type: RouterLink,
373
453
  decorators: [{
@@ -437,6 +517,14 @@ i0.ɵɵngDeclareClassMetadata({
437
517
  transform: booleanAttribute
438
518
  }]
439
519
  }],
520
+ browserUrl: [{
521
+ type: i0.Input,
522
+ args: [{
523
+ isSignal: true,
524
+ alias: "browserUrl",
525
+ required: false
526
+ }]
527
+ }],
440
528
  routerLink: [{
441
529
  type: Input
442
530
  }],
@@ -545,7 +633,7 @@ class RouterLinkActive {
545
633
  }
546
634
  static ɵfac = i0.ɵɵngDeclareFactory({
547
635
  minVersion: "12.0.0",
548
- version: "21.2.1",
636
+ version: "22.0.0-next.1",
549
637
  ngImport: i0,
550
638
  type: RouterLinkActive,
551
639
  deps: [{
@@ -561,7 +649,7 @@ class RouterLinkActive {
561
649
  });
562
650
  static ɵdir = i0.ɵɵngDeclareDirective({
563
651
  minVersion: "14.0.0",
564
- version: "21.2.1",
652
+ version: "22.0.0-next.1",
565
653
  type: RouterLinkActive,
566
654
  isStandalone: true,
567
655
  selector: "[routerLinkActive]",
@@ -585,7 +673,7 @@ class RouterLinkActive {
585
673
  }
586
674
  i0.ɵɵngDeclareClassMetadata({
587
675
  minVersion: "12.0.0",
588
- version: "21.2.1",
676
+ version: "22.0.0-next.1",
589
677
  ngImport: i0,
590
678
  type: RouterLinkActive,
591
679
  decorators: [{
@@ -637,7 +725,7 @@ class PreloadAllModules {
637
725
  }
638
726
  static ɵfac = i0.ɵɵngDeclareFactory({
639
727
  minVersion: "12.0.0",
640
- version: "21.2.1",
728
+ version: "22.0.0-next.1",
641
729
  ngImport: i0,
642
730
  type: PreloadAllModules,
643
731
  deps: [],
@@ -645,7 +733,7 @@ class PreloadAllModules {
645
733
  });
646
734
  static ɵprov = i0.ɵɵngDeclareInjectable({
647
735
  minVersion: "12.0.0",
648
- version: "21.2.1",
736
+ version: "22.0.0-next.1",
649
737
  ngImport: i0,
650
738
  type: PreloadAllModules,
651
739
  providedIn: 'root'
@@ -653,7 +741,7 @@ class PreloadAllModules {
653
741
  }
654
742
  i0.ɵɵngDeclareClassMetadata({
655
743
  minVersion: "12.0.0",
656
- version: "21.2.1",
744
+ version: "22.0.0-next.1",
657
745
  ngImport: i0,
658
746
  type: PreloadAllModules,
659
747
  decorators: [{
@@ -669,7 +757,7 @@ class NoPreloading {
669
757
  }
670
758
  static ɵfac = i0.ɵɵngDeclareFactory({
671
759
  minVersion: "12.0.0",
672
- version: "21.2.1",
760
+ version: "22.0.0-next.1",
673
761
  ngImport: i0,
674
762
  type: NoPreloading,
675
763
  deps: [],
@@ -677,7 +765,7 @@ class NoPreloading {
677
765
  });
678
766
  static ɵprov = i0.ɵɵngDeclareInjectable({
679
767
  minVersion: "12.0.0",
680
- version: "21.2.1",
768
+ version: "22.0.0-next.1",
681
769
  ngImport: i0,
682
770
  type: NoPreloading,
683
771
  providedIn: 'root'
@@ -685,7 +773,7 @@ class NoPreloading {
685
773
  }
686
774
  i0.ɵɵngDeclareClassMetadata({
687
775
  minVersion: "12.0.0",
688
- version: "21.2.1",
776
+ version: "22.0.0-next.1",
689
777
  ngImport: i0,
690
778
  type: NoPreloading,
691
779
  decorators: [{
@@ -766,7 +854,7 @@ class RouterPreloader {
766
854
  }
767
855
  static ɵfac = i0.ɵɵngDeclareFactory({
768
856
  minVersion: "12.0.0",
769
- version: "21.2.1",
857
+ version: "22.0.0-next.1",
770
858
  ngImport: i0,
771
859
  type: RouterPreloader,
772
860
  deps: [{
@@ -782,7 +870,7 @@ class RouterPreloader {
782
870
  });
783
871
  static ɵprov = i0.ɵɵngDeclareInjectable({
784
872
  minVersion: "12.0.0",
785
- version: "21.2.1",
873
+ version: "22.0.0-next.1",
786
874
  ngImport: i0,
787
875
  type: RouterPreloader,
788
876
  providedIn: 'root'
@@ -790,7 +878,7 @@ class RouterPreloader {
790
878
  }
791
879
  i0.ɵɵngDeclareClassMetadata({
792
880
  minVersion: "12.0.0",
793
- version: "21.2.1",
881
+ version: "22.0.0-next.1",
794
882
  ngImport: i0,
795
883
  type: RouterPreloader,
796
884
  decorators: [{
@@ -892,7 +980,7 @@ class RouterScroller {
892
980
  }
893
981
  static ɵfac = i0.ɵɵngDeclareFactory({
894
982
  minVersion: "12.0.0",
895
- version: "21.2.1",
983
+ version: "22.0.0-next.1",
896
984
  ngImport: i0,
897
985
  type: RouterScroller,
898
986
  deps: "invalid",
@@ -900,14 +988,14 @@ class RouterScroller {
900
988
  });
901
989
  static ɵprov = i0.ɵɵngDeclareInjectable({
902
990
  minVersion: "12.0.0",
903
- version: "21.2.1",
991
+ version: "22.0.0-next.1",
904
992
  ngImport: i0,
905
993
  type: RouterScroller
906
994
  });
907
995
  }
908
996
  i0.ɵɵngDeclareClassMetadata({
909
997
  minVersion: "12.0.0",
910
- version: "21.2.1",
998
+ version: "22.0.0-next.1",
911
999
  ngImport: i0,
912
1000
  type: RouterScroller,
913
1001
  decorators: [{
@@ -1217,7 +1305,7 @@ class NavigationStateManager extends StateManager {
1217
1305
  }
1218
1306
  static ɵfac = i0.ɵɵngDeclareFactory({
1219
1307
  minVersion: "12.0.0",
1220
- version: "21.2.1",
1308
+ version: "22.0.0-next.1",
1221
1309
  ngImport: i0,
1222
1310
  type: NavigationStateManager,
1223
1311
  deps: [],
@@ -1225,7 +1313,7 @@ class NavigationStateManager extends StateManager {
1225
1313
  });
1226
1314
  static ɵprov = i0.ɵɵngDeclareInjectable({
1227
1315
  minVersion: "12.0.0",
1228
- version: "21.2.1",
1316
+ version: "22.0.0-next.1",
1229
1317
  ngImport: i0,
1230
1318
  type: NavigationStateManager,
1231
1319
  providedIn: 'root'
@@ -1233,7 +1321,7 @@ class NavigationStateManager extends StateManager {
1233
1321
  }
1234
1322
  i0.ɵɵngDeclareClassMetadata({
1235
1323
  minVersion: "12.0.0",
1236
- version: "21.2.1",
1324
+ version: "22.0.0-next.1",
1237
1325
  ngImport: i0,
1238
1326
  type: NavigationStateManager,
1239
1327
  decorators: [{
@@ -1260,10 +1348,7 @@ function provideRouter(routes, ...features) {
1260
1348
  provide: ROUTES,
1261
1349
  multi: true,
1262
1350
  useValue: routes
1263
- }, typeof ngDevMode === 'undefined' || ngDevMode ? {
1264
- provide: ROUTER_IS_PROVIDED,
1265
- useValue: true
1266
- } : [], {
1351
+ }, {
1267
1352
  provide: ActivatedRoute,
1268
1353
  useFactory: rootRoute
1269
1354
  }, {
@@ -1281,27 +1366,6 @@ function routerFeature(kind, providers) {
1281
1366
  ɵproviders: providers
1282
1367
  };
1283
1368
  }
1284
- const ROUTER_IS_PROVIDED = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'Router is provided' : '', {
1285
- factory: () => false
1286
- });
1287
- const routerIsProvidedDevModeCheck = {
1288
- provide: ENVIRONMENT_INITIALIZER,
1289
- multi: true,
1290
- useFactory() {
1291
- return () => {
1292
- if (!inject(ROUTER_IS_PROVIDED)) {
1293
- console.warn('`provideRoutes` was called without `provideRouter` or `RouterModule.forRoot`. ' + 'This is likely a mistake.');
1294
- }
1295
- };
1296
- }
1297
- };
1298
- function provideRoutes(routes) {
1299
- return [{
1300
- provide: ROUTES,
1301
- multi: true,
1302
- useValue: routes
1303
- }, typeof ngDevMode === 'undefined' || ngDevMode ? routerIsProvidedDevModeCheck : []];
1304
- }
1305
1369
  function withInMemoryScrolling(options = {}) {
1306
1370
  const providers = [{
1307
1371
  provide: ROUTER_SCROLLER,
@@ -1489,10 +1553,7 @@ const ROUTER_PROVIDERS = [Location, {
1489
1553
  }, Router, ChildrenOutletContexts, {
1490
1554
  provide: ActivatedRoute,
1491
1555
  useFactory: rootRoute
1492
- }, RouterConfigLoader, typeof ngDevMode === 'undefined' || ngDevMode ? {
1493
- provide: ROUTER_IS_PROVIDED,
1494
- useValue: true
1495
- } : []];
1556
+ }, RouterConfigLoader];
1496
1557
  class RouterModule {
1497
1558
  constructor() {
1498
1559
  if (typeof ngDevMode === 'undefined' || ngDevMode) {
@@ -1532,7 +1593,7 @@ class RouterModule {
1532
1593
  }
1533
1594
  static ɵfac = i0.ɵɵngDeclareFactory({
1534
1595
  minVersion: "12.0.0",
1535
- version: "21.2.1",
1596
+ version: "22.0.0-next.1",
1536
1597
  ngImport: i0,
1537
1598
  type: RouterModule,
1538
1599
  deps: [],
@@ -1540,7 +1601,7 @@ class RouterModule {
1540
1601
  });
1541
1602
  static ɵmod = i0.ɵɵngDeclareNgModule({
1542
1603
  minVersion: "14.0.0",
1543
- version: "21.2.1",
1604
+ version: "22.0.0-next.1",
1544
1605
  ngImport: i0,
1545
1606
  type: RouterModule,
1546
1607
  imports: [RouterOutlet, RouterLink, RouterLinkActive, _EmptyOutletComponent],
@@ -1548,14 +1609,14 @@ class RouterModule {
1548
1609
  });
1549
1610
  static ɵinj = i0.ɵɵngDeclareInjector({
1550
1611
  minVersion: "12.0.0",
1551
- version: "21.2.1",
1612
+ version: "22.0.0-next.1",
1552
1613
  ngImport: i0,
1553
1614
  type: RouterModule
1554
1615
  });
1555
1616
  }
1556
1617
  i0.ɵɵngDeclareClassMetadata({
1557
1618
  minVersion: "12.0.0",
1558
- version: "21.2.1",
1619
+ version: "22.0.0-next.1",
1559
1620
  ngImport: i0,
1560
1621
  type: RouterModule,
1561
1622
  decorators: [{
@@ -1617,5 +1678,5 @@ function provideRouterInitializer() {
1617
1678
  }];
1618
1679
  }
1619
1680
 
1620
- export { NoPreloading, PreloadAllModules, PreloadingStrategy, ROUTER_INITIALIZER, ROUTER_PROVIDERS, RouterLink, RouterLinkActive, RouterModule, RouterPreloader, provideRouter, provideRoutes, withComponentInputBinding, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withExperimentalAutoCleanupInjectors, withExperimentalPlatformNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, withViewTransitions };
1681
+ export { NoPreloading, PreloadAllModules, PreloadingStrategy, ROUTER_INITIALIZER, ROUTER_PROVIDERS, RouterLink, RouterLinkActive, RouterModule, RouterPreloader, provideRouter, withComponentInputBinding, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withExperimentalAutoCleanupInjectors, withExperimentalPlatformNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, withViewTransitions };
1621
1682
  //# sourceMappingURL=_router_module-chunk.mjs.map