@angular/router 20.0.0-next.7 → 20.0.0-next.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.7
2
+ * @license Angular v20.0.0-next.8
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
- import { ActivatedRouteSnapshot, Params, UrlTree, RouterOutletContract, ActivatedRoute, RouterStateSnapshot, Route, LoadedRouterConfig, Router, Routes, InMemoryScrollingOptions, NavigationError, RedirectCommand, RouterConfigOptions, CanActivate, CanActivateFn, CanActivateChild, CanActivateChildFn, CanDeactivate, CanDeactivateFn, CanMatch, CanMatchFn, Resolve, ResolveFn, Event } from './router_module.d-ktU8Dnrg.js';
8
- export { ActivationEnd, ActivationStart, BaseRouteReuseStrategy, CanLoad, CanLoadFn, ChildActivationEnd, ChildActivationStart, Data, DefaultExport, DefaultUrlSerializer, DeprecatedGuard, DeprecatedResolve, DetachedRouteHandle, EventType, ExtraOptions, GuardResult, GuardsCheckEnd, GuardsCheckStart, InitialNavigation, IsActiveMatchOptions, LoadChildren, LoadChildrenCallback, MaybeAsync, Navigation, NavigationBehaviorOptions, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationExtras, NavigationSkipped, NavigationSkippedCode, NavigationStart, OnSameUrlNavigation, PRIMARY_OUTLET, ParamMap, QueryParamsHandling, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTER_OUTLET_DATA, RedirectFunction, ResolveData, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterState, RoutesRecognized, RunGuardsAndResolvers, Scroll, UrlCreationOptions, UrlMatchResult, UrlMatcher, UrlSegment, UrlSegmentGroup, UrlSerializer, convertToParamMap, defaultUrlMatcher, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, RestoredState as ɵRestoredState } from './router_module.d-ktU8Dnrg.js';
7
+ import { ActivatedRouteSnapshot, Params, UrlTree, RouterOutletContract, ActivatedRoute, RouterStateSnapshot, Route, LoadedRouterConfig, Router, Routes, InMemoryScrollingOptions, NavigationError, RedirectCommand, RouterConfigOptions, CanActivate, CanActivateFn, CanActivateChild, CanActivateChildFn, CanDeactivate, CanDeactivateFn, CanMatch, CanMatchFn, Resolve, ResolveFn, Event } from './router_module.d-D4HmHYPv.js';
8
+ export { ActivationEnd, ActivationStart, BaseRouteReuseStrategy, CanLoad, CanLoadFn, ChildActivationEnd, ChildActivationStart, Data, DefaultExport, DefaultUrlSerializer, DeprecatedGuard, DeprecatedResolve, DetachedRouteHandle, EventType, ExtraOptions, GuardResult, GuardsCheckEnd, GuardsCheckStart, InitialNavigation, IsActiveMatchOptions, LoadChildren, LoadChildrenCallback, MaybeAsync, Navigation, NavigationBehaviorOptions, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationExtras, NavigationSkipped, NavigationSkippedCode, NavigationStart, OnSameUrlNavigation, PRIMARY_OUTLET, ParamMap, QueryParamsHandling, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTER_OUTLET_DATA, RedirectFunction, ResolveData, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterState, RoutesRecognized, RunGuardsAndResolvers, Scroll, UrlCreationOptions, UrlMatchResult, UrlMatcher, UrlSegment, UrlSegmentGroup, UrlSerializer, convertToParamMap, defaultUrlMatcher, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, RestoredState as ɵRestoredState } from './router_module.d-D4HmHYPv.js';
9
9
  import { Title } from '@angular/platform-browser';
10
10
  import * as i0 from '@angular/core';
11
11
  import { EnvironmentInjector, ComponentRef, InjectionToken, Type, Injector, Compiler, OnDestroy, Provider, EnvironmentProviders, Version } from '@angular/core';
@@ -64,7 +64,7 @@ import '@angular/router';
64
64
  * createUrlTreeFromSnapshot(snapshot, ['../../team/44/user/22']);
65
65
  * ```
66
66
  */
67
- declare function createUrlTreeFromSnapshot(relativeTo: ActivatedRouteSnapshot, commands: any[], queryParams?: Params | null, fragment?: string | null): UrlTree;
67
+ declare function createUrlTreeFromSnapshot(relativeTo: ActivatedRouteSnapshot, commands: readonly any[], queryParams?: Params | null, fragment?: string | null): UrlTree;
68
68
 
69
69
  /**
70
70
  * Store contextual information about a `RouterOutlet`
@@ -297,7 +297,7 @@ declare class RouterPreloader implements OnDestroy {
297
297
  private preloadingStrategy;
298
298
  private loader;
299
299
  private subscription?;
300
- constructor(router: Router, compiler: Compiler, injector: EnvironmentInjector, preloadingStrategy: PreloadingStrategy, loader: RouterConfigLoader);
300
+ constructor(router: Router, injector: EnvironmentInjector, preloadingStrategy: PreloadingStrategy, loader: RouterConfigLoader);
301
301
  setUpPreloading(): void;
302
302
  preload(): Observable<any>;
303
303
  /** @nodoc */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/router",
3
- "version": "20.0.0-next.7",
3
+ "version": "20.0.0-next.8",
4
4
  "description": "Angular - the routing library",
5
5
  "keywords": [
6
6
  "angular",
@@ -24,9 +24,9 @@
24
24
  "tslib": "^2.3.0"
25
25
  },
26
26
  "peerDependencies": {
27
- "@angular/core": "20.0.0-next.7",
28
- "@angular/common": "20.0.0-next.7",
29
- "@angular/platform-browser": "20.0.0-next.7",
27
+ "@angular/core": "20.0.0-next.8",
28
+ "@angular/common": "20.0.0-next.8",
29
+ "@angular/platform-browser": "20.0.0-next.8",
30
30
  "rxjs": "^6.5.3 || ^7.4.0"
31
31
  },
32
32
  "ng-update": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.7
2
+ * @license Angular v20.0.0-next.8
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -570,7 +570,7 @@ type QueryParamsHandling = 'merge' | 'preserve' | 'replace' | '';
570
570
  * @see {@link Route#redirectTo}
571
571
  * @publicApi
572
572
  */
573
- type RedirectFunction = (redirectData: Pick<ActivatedRouteSnapshot, 'routeConfig' | 'url' | 'params' | 'queryParams' | 'fragment' | 'data' | 'outlet' | 'title'>) => string | UrlTree;
573
+ type RedirectFunction = (redirectData: Pick<ActivatedRouteSnapshot, 'routeConfig' | 'url' | 'params' | 'queryParams' | 'fragment' | 'data' | 'outlet' | 'title'>) => MaybeAsync<string | UrlTree>;
574
574
  /**
575
575
  * A policy for when to run guards and resolvers on a route.
576
576
  *
@@ -3167,7 +3167,7 @@ declare class Router {
3167
3167
  * tree should be created relative to the root.
3168
3168
  * ```
3169
3169
  */
3170
- createUrlTree(commands: any[], navigationExtras?: UrlCreationOptions): UrlTree;
3170
+ createUrlTree(commands: readonly any[], navigationExtras?: UrlCreationOptions): UrlTree;
3171
3171
  /**
3172
3172
  * Navigates to a view using an absolute route path.
3173
3173
  *
@@ -3223,7 +3223,7 @@ declare class Router {
3223
3223
  * @see [Routing and Navigation guide](guide/routing/common-router-tasks)
3224
3224
  *
3225
3225
  */
3226
- navigate(commands: any[], extras?: NavigationExtras): Promise<boolean>;
3226
+ navigate(commands: readonly any[], extras?: NavigationExtras): Promise<boolean>;
3227
3227
  /** Serializes a `UrlTree` into a string */
3228
3228
  serializeUrl(url: UrlTree): string;
3229
3229
  /** Parses a string into a `UrlTree` */
@@ -3465,7 +3465,7 @@ declare class RouterLink implements OnChanges, OnDestroy {
3465
3465
  * - **null|undefined**: effectively disables the `routerLink`
3466
3466
  * @see {@link Router#createUrlTree}
3467
3467
  */
3468
- set routerLink(commandsOrUrlTree: any[] | string | UrlTree | null | undefined);
3468
+ set routerLink(commandsOrUrlTree: readonly any[] | string | UrlTree | null | undefined);
3469
3469
  /** @nodoc */
3470
3470
  onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean;
3471
3471
  /** @nodoc */
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.7
2
+ * @license Angular v20.0.0-next.8
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import * as i0 from '@angular/core';
8
8
  import { ModuleWithProviders, WritableSignal, DebugElement, Type } from '@angular/core';
9
- import { Routes, ExtraOptions, RouterModule } from '../router_module.d-ktU8Dnrg.js';
10
- export { ɵEmptyOutletComponent as ɵɵEmptyOutletComponent, RouterLink as ɵɵRouterLink, RouterLinkActive as ɵɵRouterLinkActive, RouterOutlet as ɵɵRouterOutlet } from '../router_module.d-ktU8Dnrg.js';
9
+ import { Routes, ExtraOptions, RouterModule } from '../router_module.d-D4HmHYPv.js';
10
+ export { ɵEmptyOutletComponent as ɵɵEmptyOutletComponent, RouterLink as ɵɵRouterLink, RouterLinkActive as ɵɵRouterLinkActive, RouterOutlet as ɵɵRouterOutlet } from '../router_module.d-D4HmHYPv.js';
11
11
  import { ComponentFixture } from '@angular/core/testing';
12
12
  import 'rxjs';
13
13
  import '@angular/common';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.7
2
+ * @license Angular v20.0.0-next.8
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -13,7 +13,15 @@ import { UpgradeModule } from '@angular/upgrade/static';
13
13
  *
14
14
  * @usageNotes
15
15
  *
16
- * <code-example language="typescript">
16
+ * For standalone applications:
17
+ * ```ts
18
+ * export const appConfig: ApplicationConfig = {
19
+ * providers: [RouterUpgradeInitializer],
20
+ * };
21
+ * ```
22
+ *
23
+ * For NgModule based applications:
24
+ * ```ts
17
25
  * @NgModule({
18
26
  * imports: [
19
27
  * RouterModule.forRoot(SOME_ROUTES),
@@ -26,7 +34,7 @@ import { UpgradeModule } from '@angular/upgrade/static';
26
34
  * export class AppModule {
27
35
  * ngDoBootstrap() {}
28
36
  * }
29
- * </code-example>
37
+ * ```
30
38
  *
31
39
  * @publicApi
32
40
  */