@angular/router 21.0.0-next.0 → 21.0.0-next.10
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/fesm2022/_router-chunk.mjs +4991 -0
- package/fesm2022/_router-chunk.mjs.map +1 -0
- package/fesm2022/_router_module-chunk.mjs +1210 -0
- package/fesm2022/_router_module-chunk.mjs.map +1 -0
- package/fesm2022/router.mjs +10 -63
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/testing.mjs +205 -173
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +42 -116
- package/fesm2022/upgrade.mjs.map +1 -1
- package/package.json +8 -8
- package/{router_module.d.d.ts → types/_router_module-chunk.d.ts} +28 -2
- package/{index.d.ts → types/router.d.ts} +45 -10
- package/{testing/index.d.ts → types/testing.d.ts} +4 -4
- package/{upgrade/index.d.ts → types/upgrade.d.ts} +6 -6
- package/fesm2022/router2.mjs +0 -5996
- package/fesm2022/router2.mjs.map +0 -1
- package/fesm2022/router_module.mjs +0 -1678
- package/fesm2022/router_module.mjs.map +0 -1
package/fesm2022/upgrade.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"upgrade.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/router/upgrade/src/upgrade.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Location} from '@angular/common';\nimport {APP_BOOTSTRAP_LISTENER, ComponentRef, inject} from '@angular/core';\nimport {Router, ɵRestoredState as RestoredState} from '../../index';\nimport {UpgradeModule} from '@angular/upgrade/static';\n\n/**\n * Creates an initializer that sets up `ngRoute` integration\n * along with setting up the Angular router.\n *\n * @usageNotes\n *\n * For standalone applications:\n * ```ts\n * export const appConfig: ApplicationConfig = {\n * providers: [RouterUpgradeInitializer],\n * };\n * ```\n *\n * For NgModule based applications:\n * ```ts\n * @NgModule({\n * imports: [\n * RouterModule.forRoot(SOME_ROUTES),\n * UpgradeModule\n * ],\n * providers: [\n * RouterUpgradeInitializer\n * ]\n * })\n * export class AppModule {\n * ngDoBootstrap() {}\n * }\n * ```\n *\n * @publicApi\n */\nexport const RouterUpgradeInitializer = {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: locationSyncBootstrapListener as () => () => void,\n};\n\n/**\n * @internal\n */\nexport function locationSyncBootstrapListener() {\n const ngUpgrade = inject(UpgradeModule);\n\n return () => {\n setUpLocationSync(ngUpgrade);\n };\n}\n\n/**\n * Sets up a location change listener to trigger `history.pushState`.\n * Works around the problem that `onPopState` does not trigger `history.pushState`.\n * Must be called *after* calling `UpgradeModule.bootstrap`.\n *\n * @param ngUpgrade The upgrade NgModule.\n * @param urlType The location strategy.\n * @see {@link /api/common/HashLocationStrategy HashLocationStrategy}\n * @see {@link /api/common/PathLocationStrategy PathLocationStrategy}\n *\n * @publicApi\n */\nexport function setUpLocationSync(\n ngUpgrade: UpgradeModule,\n urlType: 'path' | 'hash' = 'path',\n): void {\n if (!ngUpgrade.$injector) {\n throw new Error(`\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\n `);\n }\n\n const router: Router = ngUpgrade.injector.get(Router);\n const location: Location = ngUpgrade.injector.get(Location);\n\n ngUpgrade.$injector\n .get('$rootScope')\n .$on(\n '$locationChangeStart',\n (\n event: any,\n newUrl: string,\n oldUrl: string,\n newState?: {[k: string]: unknown} | RestoredState,\n oldState?: {[k: string]: unknown} | RestoredState,\n ) => {\n // Navigations coming from Angular router have a navigationId state\n // property. Don't trigger Angular router navigation again if it is\n // caused by a URL change from the current Angular router\n // navigation.\n const currentNavigationId = router.getCurrentNavigation()?.id;\n const newStateNavigationId = newState?.navigationId;\n if (newStateNavigationId !== undefined && newStateNavigationId === currentNavigationId) {\n return;\n }\n\n let url;\n if (urlType === 'path') {\n url = resolveUrl(newUrl);\n } else if (urlType === 'hash') {\n // Remove the first hash from the URL\n const hashIdx = newUrl.indexOf('#');\n url = resolveUrl(newUrl.substring(0, hashIdx) + newUrl.substring(hashIdx + 1));\n } else {\n throw 'Invalid URLType passed to setUpLocationSync: ' + urlType;\n }\n const path = location.normalize(url.pathname);\n router.navigateByUrl(path + url.search + url.hash);\n },\n );\n}\n\n/**\n * Normalizes and parses a URL.\n *\n * - Normalizing means that a relative URL will be resolved into an absolute URL in the context of\n * the application document.\n * - Parsing means that the anchor's `protocol`, `hostname`, `port`, `pathname` and related\n * properties are all populated to reflect the normalized URL.\n *\n * While this approach has wide compatibility, it doesn't work as expected on IE. On IE, normalizing\n * happens similar to other browsers, but the parsed components will not be set. (E.g. if you assign\n * `a.href = 'foo'`, then `a.protocol`, `a.host`, etc. will not be correctly updated.)\n * We work around that by performing the parsing in a 2nd step by taking a previously normalized URL\n * and assigning it again. This correctly populates all properties.\n *\n * See\n * https://github.com/angular/angular.js/blob/2c7400e7d07b0f6cec1817dab40b9250ce8ebce6/src/ng/urlUtils.js#L26-L33\n * for more info.\n */\nlet anchor: HTMLAnchorElement | undefined;\nfunction resolveUrl(url: string): {pathname: string; search: string; hash: string} {\n anchor ??= document.createElement('a');\n\n anchor.setAttribute('href', url);\n anchor.setAttribute('href', anchor.href);\n\n return {\n // IE does not start `pathname` with `/` like other browsers.\n pathname: `/${anchor.pathname.replace(/^\\//, '')}`,\n search: anchor.search,\n hash: anchor.hash,\n };\n}\n"],"names":["locationSyncBootstrapListener","inject","UpgradeModule","setUpLocationSync","ngUpgrade","injector","get","Location","$injector","currentNavigationId","router","getCurrentNavigation","id","newState","navigationId","newStateNavigationId"],"mappings":";;;;;;;;;;;;;;;;;;;AAwDE,SAAOA,6BAAKA,GAAA;iBACO,GAAAC,MAAA,CAAAC,aAAA,CAAA;EACnB,OAAC,MAAA;AACHC,IAAAA,iBAAA,CAAAC,SAAA,CAAA;;;;;;;;;AA8BK;cASsE,GAAAA,SAAA,CAAAC;gBAI7D,GAAAD,SAAA,CAAAC,QAAA,CAAAC,GAAA,CAAAC,QAAA,CAAA;AACN,EAAA,SAAA,CAAAC,SAA0B;UASxBC,mBAAqC,GAAAC,MAAA,CAAAC,oBAAA,IAAAC,EAAA;8BAC/B,GAAAC,QAAA,EAAAC,YAAA;0CAIR,IAAAC,oBAEiD,KAEpDN,mBACL,EAAA;AAEA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/router",
|
|
3
|
-
"version": "21.0.0-next.
|
|
3
|
+
"version": "21.0.0-next.10",
|
|
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": "21.0.0-next.
|
|
28
|
-
"@angular/common": "21.0.0-next.
|
|
29
|
-
"@angular/platform-browser": "21.0.0-next.
|
|
27
|
+
"@angular/core": "21.0.0-next.10",
|
|
28
|
+
"@angular/common": "21.0.0-next.10",
|
|
29
|
+
"@angular/platform-browser": "21.0.0-next.10",
|
|
30
30
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
31
31
|
},
|
|
32
32
|
"ng-update": {
|
|
@@ -51,22 +51,22 @@
|
|
|
51
51
|
},
|
|
52
52
|
"sideEffects": false,
|
|
53
53
|
"module": "./fesm2022/router.mjs",
|
|
54
|
-
"typings": "./
|
|
54
|
+
"typings": "./types/router.d.ts",
|
|
55
55
|
"type": "module",
|
|
56
56
|
"exports": {
|
|
57
57
|
"./package.json": {
|
|
58
58
|
"default": "./package.json"
|
|
59
59
|
},
|
|
60
60
|
".": {
|
|
61
|
-
"types": "./
|
|
61
|
+
"types": "./types/router.d.ts",
|
|
62
62
|
"default": "./fesm2022/router.mjs"
|
|
63
63
|
},
|
|
64
64
|
"./testing": {
|
|
65
|
-
"types": "./testing
|
|
65
|
+
"types": "./types/testing.d.ts",
|
|
66
66
|
"default": "./fesm2022/testing.mjs"
|
|
67
67
|
},
|
|
68
68
|
"./upgrade": {
|
|
69
|
-
"types": "./upgrade
|
|
69
|
+
"types": "./types/upgrade.d.ts",
|
|
70
70
|
"default": "./fesm2022/upgrade.mjs"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0-next.
|
|
3
|
-
* (c) 2010-2025 Google LLC. https://angular.
|
|
2
|
+
* @license Angular v21.0.0-next.10
|
|
3
|
+
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -861,6 +861,9 @@ interface Route {
|
|
|
861
861
|
component?: Type<any>;
|
|
862
862
|
/**
|
|
863
863
|
* An object specifying a lazy-loaded component.
|
|
864
|
+
*
|
|
865
|
+
* @see [Injection context lazy loading](guide/routing/define-routes#injection-context-lazy-loading)
|
|
866
|
+
*
|
|
864
867
|
*/
|
|
865
868
|
loadComponent?: () => Type<unknown> | Observable<Type<unknown> | DefaultExport<Type<unknown>>> | Promise<Type<unknown> | DefaultExport<Type<unknown>>>;
|
|
866
869
|
/**
|
|
@@ -942,6 +945,9 @@ interface Route {
|
|
|
942
945
|
children?: Routes;
|
|
943
946
|
/**
|
|
944
947
|
* An object specifying lazy-loaded child routes.
|
|
948
|
+
*
|
|
949
|
+
* @see [Injection context lazy loading](guide/routing/define-routes#injection-context-lazy-loading)
|
|
950
|
+
*
|
|
945
951
|
*/
|
|
946
952
|
loadChildren?: LoadChildren;
|
|
947
953
|
/**
|
|
@@ -2605,6 +2611,7 @@ declare abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {
|
|
|
2605
2611
|
* ```
|
|
2606
2612
|
*
|
|
2607
2613
|
* @publicApi
|
|
2614
|
+
* @see [Page routerOutletData](guide/routing/show-routes-with-outlets#passing-contextual-data-to-routed-components)
|
|
2608
2615
|
*/
|
|
2609
2616
|
declare const ROUTER_OUTLET_DATA: InjectionToken<Signal<unknown>>;
|
|
2610
2617
|
/**
|
|
@@ -3557,6 +3564,9 @@ declare class RouterLink implements OnChanges, OnDestroy {
|
|
|
3557
3564
|
* <a routerLink="/" routerLinkActive="active" ariaCurrentWhenActive="page">Home Page</a>
|
|
3558
3565
|
* ```
|
|
3559
3566
|
*
|
|
3567
|
+
* NOTE: RouterLinkActive is a `ContentChildren` query.
|
|
3568
|
+
* Content children queries do not retrieve elements or directives that are in other components' templates, since a component's template is always a black box to its ancestors.
|
|
3569
|
+
*
|
|
3560
3570
|
* @ngModule RouterModule
|
|
3561
3571
|
*
|
|
3562
3572
|
* @publicApi
|
|
@@ -3648,6 +3658,8 @@ type InitialNavigation = 'disabled' | 'enabledBlocking' | 'enabledNonBlocking';
|
|
|
3648
3658
|
/**
|
|
3649
3659
|
* Extra configuration options that can be used with the `withRouterConfig` function.
|
|
3650
3660
|
*
|
|
3661
|
+
* @see [Router configuration options](guide/routing/customizing-route-behavior#router-configuration-options)
|
|
3662
|
+
*
|
|
3651
3663
|
* @publicApi
|
|
3652
3664
|
*/
|
|
3653
3665
|
interface RouterConfigOptions {
|
|
@@ -3671,6 +3683,9 @@ interface RouterConfigOptions {
|
|
|
3671
3683
|
* the browser history rather than simply resetting a portion of the URL.
|
|
3672
3684
|
*
|
|
3673
3685
|
* The default value is `replace` when not set.
|
|
3686
|
+
*
|
|
3687
|
+
* @see [Handle canceled navigations](guide/routing/customizing-route-behavior#handle-canceled-navigations)
|
|
3688
|
+
*
|
|
3674
3689
|
*/
|
|
3675
3690
|
canceledNavigationResolution?: 'replace' | 'computed';
|
|
3676
3691
|
/**
|
|
@@ -3679,6 +3694,8 @@ interface RouterConfigOptions {
|
|
|
3679
3694
|
* If unset, the `Router` will use `'ignore'`.
|
|
3680
3695
|
*
|
|
3681
3696
|
* @see {@link OnSameUrlNavigation}
|
|
3697
|
+
*
|
|
3698
|
+
* @see [React to same-URL navigations](guide/routing/customizing-route-behavior#react-to-same-url-navigations)
|
|
3682
3699
|
*/
|
|
3683
3700
|
onSameUrlNavigation?: OnSameUrlNavigation;
|
|
3684
3701
|
/**
|
|
@@ -3697,6 +3714,8 @@ interface RouterConfigOptions {
|
|
|
3697
3714
|
* matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not
|
|
3698
3715
|
* `a;foo=bar/b`.
|
|
3699
3716
|
*
|
|
3717
|
+
* @see [Control parameter inheritance](guide/routing/customizing-route-behavior#control-parameter-inheritance)
|
|
3718
|
+
*
|
|
3700
3719
|
*/
|
|
3701
3720
|
paramsInheritanceStrategy?: 'emptyOnly' | 'always';
|
|
3702
3721
|
/**
|
|
@@ -3705,6 +3724,9 @@ interface RouterConfigOptions {
|
|
|
3705
3724
|
* Set to 'eager' if prefer to update the URL at the beginning of navigation.
|
|
3706
3725
|
* Updating the URL early allows you to handle a failure of navigation by
|
|
3707
3726
|
* showing an error message with the URL that failed.
|
|
3727
|
+
*
|
|
3728
|
+
* @see [Decide when the URL updates](guide/routing/customizing-route-behavior#decide-when-the-url-updates)
|
|
3729
|
+
*
|
|
3708
3730
|
*/
|
|
3709
3731
|
urlUpdateStrategy?: 'deferred' | 'eager';
|
|
3710
3732
|
/**
|
|
@@ -3718,6 +3740,10 @@ interface RouterConfigOptions {
|
|
|
3718
3740
|
*
|
|
3719
3741
|
* @see {@link Router#createUrlTree}
|
|
3720
3742
|
* @see {@link QueryParamsHandling}
|
|
3743
|
+
*
|
|
3744
|
+
* @see [Choose default query parameter handling](guide/routing/customizing-route-behavior#choose-default-query-parameter-handling)
|
|
3745
|
+
|
|
3746
|
+
*
|
|
3721
3747
|
*/
|
|
3722
3748
|
defaultQueryParamsHandling?: QueryParamsHandling;
|
|
3723
3749
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0-next.
|
|
3
|
-
* (c) 2010-2025 Google LLC. https://angular.
|
|
2
|
+
* @license Angular v21.0.0-next.10
|
|
3
|
+
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { ActivatedRouteSnapshot, Params, UrlTree, RouterOutletContract, ActivatedRoute, RouterStateSnapshot, Route, LoadedRouterConfig, Router, Routes, InMemoryScrollingOptions, RouterConfigOptions, NavigationError, RedirectCommand, CanMatch, CanMatchFn, CanActivate, CanActivateFn, CanActivateChild, CanActivateChildFn, CanDeactivate, CanDeactivateFn, Resolve, ResolveFn, Event } from './
|
|
8
|
-
export { ActivationEnd, ActivationStart, BaseRouteReuseStrategy, CanLoad, CanLoadFn, ChildActivationEnd, ChildActivationStart, Data, DefaultExport,
|
|
7
|
+
import { ActivatedRouteSnapshot, Params, DefaultUrlSerializer, UrlTree, RouterOutletContract, ActivatedRoute, RouterStateSnapshot, Route, LoadedRouterConfig, Router, Routes, InMemoryScrollingOptions, RouterConfigOptions, NavigationError, RedirectCommand, CanMatch, CanMatchFn, CanActivate, CanActivateFn, CanActivateChild, CanActivateChildFn, CanDeactivate, CanDeactivateFn, Resolve, ResolveFn, Event } from './_router_module-chunk.js';
|
|
8
|
+
export { ActivationEnd, ActivationStart, BaseRouteReuseStrategy, CanLoad, CanLoadFn, ChildActivationEnd, ChildActivationStart, Data, DefaultExport, 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-chunk.js';
|
|
9
9
|
import { Title } from '@angular/platform-browser';
|
|
10
10
|
import * as i0 from '@angular/core';
|
|
11
11
|
import { ComponentRef, EnvironmentInjector, InjectionToken, Compiler, Injector, Type, OnDestroy, EnvironmentProviders, Provider, Version } from '@angular/core';
|
|
@@ -26,6 +26,9 @@ import '@angular/common';
|
|
|
26
26
|
* @param queryParams The query parameters for the `UrlTree`. `null` if the `UrlTree` does not have
|
|
27
27
|
* any query parameters.
|
|
28
28
|
* @param fragment The fragment for the `UrlTree`. `null` if the `UrlTree` does not have a fragment.
|
|
29
|
+
* @param urlSerializer The `UrlSerializer` to use for handling query parameter normalization.
|
|
30
|
+
* You should provide your application's custom `UrlSerializer` if one is configured to parse and
|
|
31
|
+
* serialize query parameter values to and from objects other than strings/string arrays.
|
|
29
32
|
*
|
|
30
33
|
* @usageNotes
|
|
31
34
|
*
|
|
@@ -63,7 +66,7 @@ import '@angular/common';
|
|
|
63
66
|
* createUrlTreeFromSnapshot(snapshot, ['../../team/44/user/22']);
|
|
64
67
|
* ```
|
|
65
68
|
*/
|
|
66
|
-
declare function createUrlTreeFromSnapshot(relativeTo: ActivatedRouteSnapshot, commands: readonly any[], queryParams?: Params | null, fragment?: string | null): UrlTree;
|
|
69
|
+
declare function createUrlTreeFromSnapshot(relativeTo: ActivatedRouteSnapshot, commands: readonly any[], queryParams?: Params | null, fragment?: string | null, urlSerializer?: DefaultUrlSerializer): UrlTree;
|
|
67
70
|
|
|
68
71
|
/**
|
|
69
72
|
* Store contextual information about a `RouterOutlet`
|
|
@@ -171,7 +174,7 @@ interface ViewTransitionInfo {
|
|
|
171
174
|
* incorporate titles in named outlets.
|
|
172
175
|
*
|
|
173
176
|
* @publicApi
|
|
174
|
-
* @see [Page title guide](guide/routing/
|
|
177
|
+
* @see [Page title guide](guide/routing/define-routes#using-titlestrategy-for-page-titles)
|
|
175
178
|
*/
|
|
176
179
|
declare abstract class TitleStrategy {
|
|
177
180
|
/** Performs the application title update. */
|
|
@@ -221,8 +224,8 @@ declare class RouterConfigLoader {
|
|
|
221
224
|
onLoadStartListener?: (r: Route) => void;
|
|
222
225
|
onLoadEndListener?: (r: Route) => void;
|
|
223
226
|
private readonly compiler;
|
|
224
|
-
loadComponent(injector: EnvironmentInjector, route: Route):
|
|
225
|
-
loadChildren(parentInjector: Injector, route: Route):
|
|
227
|
+
loadComponent(injector: EnvironmentInjector, route: Route): Promise<Type<unknown>>;
|
|
228
|
+
loadChildren(parentInjector: Injector, route: Route): Promise<LoadedRouterConfig>;
|
|
226
229
|
static ɵfac: i0.ɵɵFactoryDeclaration<RouterConfigLoader, never>;
|
|
227
230
|
static ɵprov: i0.ɵɵInjectableDeclaration<RouterConfigLoader>;
|
|
228
231
|
}
|
|
@@ -234,7 +237,7 @@ declare class RouterConfigLoader {
|
|
|
234
237
|
* in @angular-devkit/build-angular. If there are any updates to the contract here, it will require
|
|
235
238
|
* an update to the extractor.
|
|
236
239
|
*/
|
|
237
|
-
declare function loadChildren(route: Route, compiler: Compiler, parentInjector: Injector, onLoadEndListener?: (r: Route) => void):
|
|
240
|
+
declare function loadChildren(route: Route, compiler: Compiler, parentInjector: Injector, onLoadEndListener?: (r: Route) => void): Promise<LoadedRouterConfig>;
|
|
238
241
|
|
|
239
242
|
/**
|
|
240
243
|
* @description
|
|
@@ -333,6 +336,7 @@ declare class RouterPreloader implements OnDestroy {
|
|
|
333
336
|
* }
|
|
334
337
|
* );
|
|
335
338
|
* ```
|
|
339
|
+
* @see [Router](guide/routing)
|
|
336
340
|
*
|
|
337
341
|
* @see {@link RouterFeatures}
|
|
338
342
|
*
|
|
@@ -404,6 +408,32 @@ type InMemoryScrollingFeature = RouterFeature<RouterFeatureKind.InMemoryScrollin
|
|
|
404
408
|
* @returns A set of providers for use with `provideRouter`.
|
|
405
409
|
*/
|
|
406
410
|
declare function withInMemoryScrolling(options?: InMemoryScrollingOptions): InMemoryScrollingFeature;
|
|
411
|
+
/**
|
|
412
|
+
* Enables the use of the browser's `History` API for navigation.
|
|
413
|
+
*
|
|
414
|
+
* @description
|
|
415
|
+
* This function provides a `Location` strategy that uses the browser's `History` API.
|
|
416
|
+
* It is required when using features that rely on `history.state`. For example, the
|
|
417
|
+
* `state` object in `NavigationExtras` is passed to `history.pushState` or
|
|
418
|
+
* `history.replaceState`.
|
|
419
|
+
*
|
|
420
|
+
* @usageNotes
|
|
421
|
+
*
|
|
422
|
+
* ```typescript
|
|
423
|
+
* const appRoutes: Routes = [
|
|
424
|
+
* { path: 'page', component: PageComponent },
|
|
425
|
+
* ];
|
|
426
|
+
*
|
|
427
|
+
* bootstrapApplication(AppComponent, {
|
|
428
|
+
* providers: [
|
|
429
|
+
* provideRouter(appRoutes, withPlatformNavigation())
|
|
430
|
+
* ]
|
|
431
|
+
* });
|
|
432
|
+
* ```
|
|
433
|
+
*
|
|
434
|
+
* @returns A `RouterFeature` that enables the platform navigation.
|
|
435
|
+
*/
|
|
436
|
+
declare function withPlatformNavigation(): RouterFeature<RouterFeatureKind.InMemoryScrollingFeature>;
|
|
407
437
|
/**
|
|
408
438
|
* A type alias for providers returned by `withEnabledBlockingInitialNavigation` for use with
|
|
409
439
|
* `provideRouter`.
|
|
@@ -893,5 +923,10 @@ declare function afterNextNavigation(router: {
|
|
|
893
923
|
events: Observable<Event>;
|
|
894
924
|
}, action: () => void): void;
|
|
895
925
|
|
|
896
|
-
|
|
926
|
+
/**
|
|
927
|
+
* Provides a way to use the synchronous version of the recognize function using rxjs.
|
|
928
|
+
*/
|
|
929
|
+
declare function provideSometimesSyncRecognize(): EnvironmentProviders;
|
|
930
|
+
|
|
931
|
+
export { ActivatedRoute, ActivatedRouteSnapshot, CanActivate, CanActivateChild, CanActivateChildFn, CanActivateFn, CanDeactivate, CanDeactivateFn, CanMatch, CanMatchFn, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, Event, InMemoryScrollingOptions, NavigationError, NoPreloading, OutletContext, Params, PreloadAllModules, PreloadingStrategy, ROUTES, RedirectCommand, Resolve, ResolveFn, Route, Router, RouterConfigOptions, RouterOutletContract, RouterPreloader, RouterStateSnapshot, Routes, TitleStrategy, UrlHandlingStrategy, UrlTree, VERSION, createUrlTreeFromSnapshot, mapToCanActivate, mapToCanActivateChild, mapToCanDeactivate, mapToCanMatch, mapToResolve, provideRouter, provideRoutes, withComponentInputBinding, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, withViewTransitions, afterNextNavigation as ɵafterNextNavigation, loadChildren as ɵloadChildren, provideSometimesSyncRecognize as ɵprovideSometimesSyncRecognize, withPlatformNavigation as ɵwithPlatformNavigation };
|
|
897
932
|
export type { ComponentInputBindingFeature, DebugTracingFeature, DisabledInitialNavigationFeature, EnabledBlockingInitialNavigationFeature, InMemoryScrollingFeature, InitialNavigationFeature, NavigationErrorHandlerFeature, PreloadingFeature, RouterConfigurationFeature, RouterFeature, RouterFeatures, RouterHashLocationFeature, ViewTransitionInfo, ViewTransitionsFeature, ViewTransitionsFeatureOptions };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0-next.
|
|
3
|
-
* (c) 2010-2025 Google LLC. https://angular.
|
|
2
|
+
* @license Angular v21.0.0-next.10
|
|
3
|
+
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
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 '
|
|
10
|
-
export { ɵEmptyOutletComponent as ɵɵEmptyOutletComponent, RouterLink as ɵɵRouterLink, RouterLinkActive as ɵɵRouterLinkActive, RouterOutlet as ɵɵRouterOutlet } from '
|
|
9
|
+
import { Routes, ExtraOptions, RouterModule } from './_router_module-chunk.js';
|
|
10
|
+
export { ɵEmptyOutletComponent as ɵɵEmptyOutletComponent, RouterLink as ɵɵRouterLink, RouterLinkActive as ɵɵRouterLinkActive, RouterOutlet as ɵɵRouterOutlet } from './_router_module-chunk.js';
|
|
11
11
|
import { ComponentFixture } from '@angular/core/testing';
|
|
12
12
|
import 'rxjs';
|
|
13
13
|
import '@angular/common';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0-next.
|
|
3
|
-
* (c) 2010-2025 Google LLC. https://angular.
|
|
2
|
+
* @license Angular v21.0.0-next.10
|
|
3
|
+
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import * as i0 from '@angular/core';
|
|
8
|
+
import { ComponentRef } from '@angular/core';
|
|
8
9
|
import { UpgradeModule } from '@angular/upgrade/static';
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -39,10 +40,9 @@ import { UpgradeModule } from '@angular/upgrade/static';
|
|
|
39
40
|
* @publicApi
|
|
40
41
|
*/
|
|
41
42
|
declare const RouterUpgradeInitializer: {
|
|
42
|
-
provide: InjectionToken<readonly ((compRef: ComponentRef<any>) => void)[]>;
|
|
43
|
+
provide: i0.InjectionToken<readonly ((compRef: ComponentRef<any>) => void)[]>;
|
|
43
44
|
multi: boolean;
|
|
44
|
-
useFactory: (
|
|
45
|
-
deps: (typeof UpgradeModule)[];
|
|
45
|
+
useFactory: () => () => void;
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
48
|
* Sets up a location change listener to trigger `history.pushState`.
|