@angular/router
Advanced tools
| /** | ||
| * @license Angular v21.1.0-next.4 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
| * @license Angular v21.1.0-rc.0 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
| * License: MIT | ||
@@ -8,6 +8,6 @@ */ | ||
| import * as i3 from '@angular/common'; | ||
| import { ViewportScroller, PlatformNavigation, PlatformLocation, Location, ɵNavigationAdapterForLocation as _NavigationAdapterForLocation, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common'; | ||
| import { ViewportScroller, PlatformNavigation, PlatformLocation, ɵPRECOMMIT_HANDLER_SUPPORTED as _PRECOMMIT_HANDLER_SUPPORTED, Location, ɵNavigationAdapterForLocation as _NavigationAdapterForLocation, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common'; | ||
| import * as i0 from '@angular/core'; | ||
| import { signal, untracked, inject, ɵINTERNAL_APPLICATION_ERROR_HANDLER as _INTERNAL_APPLICATION_ERROR_HANDLER, HostAttributeToken, ɵRuntimeError as _RuntimeError, booleanAttribute, Directive, Attribute, HostBinding, Input, HostListener, EventEmitter, ContentChildren, Output, Injectable, 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'; | ||
| import { ROUTER_CONFIGURATION, NavigationEnd, isUrlTree, Router, ActivatedRoute, RouterConfigLoader, IMPERATIVE_NAVIGATION, UrlSerializer, NavigationTransitions, NavigationStart, NavigationSkipped, NavigationSkippedCode, Scroll, StateManager, RoutesRecognized, BeforeActivateRoutes, NavigationCancel, NavigationError, isRedirectingEvent, NavigationCancellationCode, ROUTES, afterNextNavigation, stringifyEvent, NAVIGATION_ERROR_HANDLER, RoutedComponentInputBinder, INPUT_BINDER, CREATE_VIEW_TRANSITION, createViewTransition, VIEW_TRANSITION_OPTIONS, DefaultUrlSerializer, ChildrenOutletContexts, RouterOutlet, ɵEmptyOutletComponent as _EmptyOutletComponent } from './_router-chunk.mjs'; | ||
| import { ROUTER_CONFIGURATION, NavigationEnd, isUrlTree, Router, ActivatedRoute, isActive, exactMatchOptions, subsetMatchOptions, RouterConfigLoader, IMPERATIVE_NAVIGATION, UrlSerializer, NavigationTransitions, NavigationStart, NavigationSkipped, NavigationSkippedCode, Scroll, StateManager, RoutesRecognized, 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'; | ||
| import { Subject, of, from } from 'rxjs'; | ||
@@ -58,19 +58,11 @@ import { mergeAll, catchError, filter, concatMap, mergeMap } from 'rxjs/operators'; | ||
| this.isAnchorElement = tagName === 'a' || tagName === 'area' || !!(typeof customElements === 'object' && customElements.get(tagName)?.observedAttributes?.includes?.('href')); | ||
| if (!this.isAnchorElement) { | ||
| if (this.isAnchorElement) { | ||
| this.setTabIndexIfNotOnNativeEl('0'); | ||
| this.subscribeToNavigationEventsIfNecessary(); | ||
| } else { | ||
| this.setTabIndexIfNotOnNativeEl('0'); | ||
| } | ||
| } | ||
| subscribeToNavigationEventsIfNecessary() { | ||
| if (this.subscription !== undefined || !this.isAnchorElement) { | ||
| if (this.subscription !== undefined) { | ||
| return; | ||
| } | ||
| let createSubcription = this.preserveFragment; | ||
| const dependsOnRouterState = handling => handling === 'merge' || handling === 'preserve'; | ||
| createSubcription ||= dependsOnRouterState(this.queryParamsHandling); | ||
| createSubcription ||= !this.queryParamsHandling && !dependsOnRouterState(this.options?.defaultQueryParamsHandling); | ||
| if (!createSubcription) { | ||
| return; | ||
| } | ||
| this.subscription = this.router.events.subscribe(s => { | ||
@@ -97,3 +89,2 @@ if (s instanceof NavigationEnd) { | ||
| this.updateHref(); | ||
| this.subscribeToNavigationEventsIfNecessary(); | ||
| } | ||
@@ -172,3 +163,3 @@ this.onChanges.next(this); | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -194,3 +185,3 @@ type: RouterLink, | ||
| minVersion: "16.1.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| type: RouterLink, | ||
@@ -227,3 +218,3 @@ isStandalone: true, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -392,6 +383,10 @@ type: RouterLink, | ||
| isLinkActive(router) { | ||
| const options = isActiveMatchOptions(this.routerLinkActiveOptions) ? this.routerLinkActiveOptions : this.routerLinkActiveOptions.exact || false; | ||
| const options = isActiveMatchOptions(this.routerLinkActiveOptions) ? this.routerLinkActiveOptions : this.routerLinkActiveOptions.exact ?? false ? { | ||
| ...exactMatchOptions | ||
| } : { | ||
| ...subsetMatchOptions | ||
| }; | ||
| return link => { | ||
| const urlTree = link.urlTree; | ||
| return urlTree ? router.isActive(urlTree, options) : false; | ||
| return urlTree ? untracked(isActive(urlTree, router, options)) : false; | ||
| }; | ||
@@ -405,3 +400,3 @@ } | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -422,3 +417,3 @@ type: RouterLinkActive, | ||
| minVersion: "14.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| type: RouterLinkActive, | ||
@@ -447,3 +442,3 @@ isStandalone: true, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -499,3 +494,3 @@ type: RouterLinkActive, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -508,3 +503,3 @@ type: PreloadAllModules, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -517,3 +512,3 @@ type: PreloadAllModules, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -534,3 +529,3 @@ type: PreloadAllModules, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -543,3 +538,3 @@ type: NoPreloading, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -552,3 +547,3 @@ type: NoPreloading, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -582,5 +577,3 @@ type: NoPreloading, | ||
| ngOnDestroy() { | ||
| if (this.subscription) { | ||
| this.subscription.unsubscribe(); | ||
| } | ||
| this.subscription?.unsubscribe(); | ||
| } | ||
@@ -591,5 +584,8 @@ processRoutes(injector, routes) { | ||
| if (route.providers && !route._injector) { | ||
| route._injector = createEnvironmentInjector(route.providers, injector, `Route: ${route.path}`); | ||
| route._injector = createEnvironmentInjector(route.providers, injector, typeof ngDevMode === 'undefined' || ngDevMode ? `Route: ${route.path}` : ''); | ||
| } | ||
| const injectorForCurrentRoute = route._injector ?? injector; | ||
| if (route._loadedNgModuleFactory && !route._loadedInjector) { | ||
| route._loadedInjector = route._loadedNgModuleFactory.create(injectorForCurrentRoute).injector; | ||
| } | ||
| const injectorForChildren = route._loadedInjector ?? injectorForCurrentRoute; | ||
@@ -607,2 +603,5 @@ if (route.loadChildren && !route._loadedRoutes && route.canLoad === undefined || route.loadComponent && !route._loadedComponent) { | ||
| return this.preloadingStrategy.preload(route, () => { | ||
| if (injector.destroyed) { | ||
| return of(null); | ||
| } | ||
| let loadedChildren$; | ||
@@ -620,2 +619,3 @@ if (route.loadChildren && route.canLoad === undefined) { | ||
| route._loadedInjector = config.injector; | ||
| route._loadedNgModuleFactory = config.factory; | ||
| return this.processRoutes(config.injector ?? injector, config.routes); | ||
@@ -633,3 +633,3 @@ })); | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -650,3 +650,3 @@ type: RouterPreloader, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -659,3 +659,3 @@ type: RouterPreloader, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -762,3 +762,3 @@ type: RouterPreloader, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -771,3 +771,3 @@ type: RouterScroller, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -779,3 +779,3 @@ type: RouterScroller | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -814,2 +814,3 @@ type: RouterScroller, | ||
| appRootURL = new URL(this.location.prepareExternalUrl?.('/') ?? '/', this.base).href; | ||
| precommitHandlerSupported = inject(_PRECOMMIT_HANDLER_SUPPORTED); | ||
| activeHistoryEntry = this.navigation.currentEntry; | ||
@@ -1022,3 +1023,3 @@ currentNavigation = {}; | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -1031,3 +1032,3 @@ type: NavigationStateManager, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -1040,3 +1041,3 @@ type: NavigationStateManager, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -1117,3 +1118,3 @@ type: NavigationStateManager, | ||
| } | ||
| function withPlatformNavigation() { | ||
| function withExperimentalPlatformNavigation() { | ||
| const devModeLocationCheck = typeof ngDevMode === 'undefined' || ngDevMode ? [provideEnvironmentInitializer(() => { | ||
@@ -1123,5 +1124,5 @@ const locationInstance = inject(Location); | ||
| const locationConstructorName = locationInstance.constructor.name; | ||
| let message = `'withPlatformNavigation' provides a 'Location' implementation that ensures navigation APIs are consistently used.` + ` An instance of ${locationConstructorName} was found instead.`; | ||
| let message = `'withExperimentalPlatformNavigation' provides a 'Location' implementation that ensures navigation APIs are consistently used.` + ` An instance of ${locationConstructorName} was found instead.`; | ||
| if (locationConstructorName === 'SpyLocation') { | ||
| message += ` One of 'RouterTestingModule' or 'provideLocationMocks' was likely used. 'withPlatformNavigation' does not work with these because they override the Location implementation.`; | ||
| message += ` One of 'RouterTestingModule' or 'provideLocationMocks' was likely used. 'withExperimentalPlatformNavigation' does not work with these because they override the Location implementation.`; | ||
| } | ||
@@ -1138,3 +1139,3 @@ throw new Error(message); | ||
| }, devModeLocationCheck]; | ||
| return routerFeature(4, providers); | ||
| return routerFeature(11, providers); | ||
| } | ||
@@ -1264,2 +1265,8 @@ function getBootstrapListener() { | ||
| } | ||
| function withExperimentalAutoCleanupInjectors() { | ||
| return routerFeature(10, [{ | ||
| provide: ROUTE_INJECTOR_CLEANUP, | ||
| useValue: routeInjectorCleanup | ||
| }]); | ||
| } | ||
| function withComponentInputBinding() { | ||
@@ -1338,3 +1345,3 @@ const providers = [RoutedComponentInputBinder, { | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -1347,3 +1354,3 @@ type: RouterModule, | ||
| minVersion: "14.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -1356,3 +1363,3 @@ type: RouterModule, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -1364,3 +1371,3 @@ type: RouterModule | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -1427,3 +1434,3 @@ type: RouterModule, | ||
| export { NoPreloading, PreloadAllModules, PreloadingStrategy, ROUTER_INITIALIZER, ROUTER_PROVIDERS, RouterLink, RouterLinkActive, RouterModule, RouterPreloader, provideRouter, provideRoutes, withComponentInputBinding, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPlatformNavigation, withPreloading, withRouterConfig, withViewTransitions }; | ||
| 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 }; | ||
| //# sourceMappingURL=_router_module-chunk.mjs.map |
| /** | ||
| * @license Angular v21.1.0-next.4 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
| * @license Angular v21.1.0-rc.0 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
| * License: MIT | ||
| */ | ||
| export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, EventType, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationError, NavigationSkipped, NavigationSkippedCode, NavigationStart, OutletContext, PRIMARY_OUTLET, ROUTER_CONFIGURATION, ROUTER_OUTLET_DATA, ROUTES, RedirectCommand, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterOutlet, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, ɵEmptyOutletComponent, afterNextNavigation as ɵafterNextNavigation, loadChildren as ɵloadChildren, provideSometimesSyncRecognize as ɵprovideSometimesSyncRecognize } from './_router-chunk.mjs'; | ||
| export { NoPreloading, PreloadAllModules, PreloadingStrategy, ROUTER_INITIALIZER, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterPreloader, provideRouter, provideRoutes, withComponentInputBinding, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, withViewTransitions, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, withPlatformNavigation as ɵwithPlatformNavigation } from './_router_module-chunk.mjs'; | ||
| export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, EventType, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationError, NavigationSkipped, NavigationSkippedCode, NavigationStart, OutletContext, PRIMARY_OUTLET, ROUTER_CONFIGURATION, ROUTER_OUTLET_DATA, ROUTES, RedirectCommand, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterOutlet, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, destroyDetachedRouteHandle, isActive, ɵEmptyOutletComponent, afterNextNavigation as ɵafterNextNavigation, loadChildren as ɵloadChildren } from './_router-chunk.mjs'; | ||
| export { NoPreloading, PreloadAllModules, PreloadingStrategy, ROUTER_INITIALIZER, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterPreloader, provideRouter, provideRoutes, withComponentInputBinding, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withExperimentalAutoCleanupInjectors, withExperimentalPlatformNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, withViewTransitions, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS } from './_router_module-chunk.mjs'; | ||
| import { inject, Version } from '@angular/core'; | ||
@@ -31,5 +31,5 @@ import '@angular/common'; | ||
| const VERSION = /* @__PURE__ */new Version('21.1.0-next.4'); | ||
| const VERSION = /* @__PURE__ */new Version('21.1.0-rc.0'); | ||
| export { VERSION, mapToCanActivate, mapToCanActivateChild, mapToCanDeactivate, mapToCanMatch, mapToResolve }; | ||
| //# sourceMappingURL=router.mjs.map |
+12
-12
| /** | ||
| * @license Angular v21.1.0-next.4 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
| * @license Angular v21.1.0-rc.0 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
| * License: MIT | ||
@@ -36,3 +36,3 @@ */ | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -45,3 +45,3 @@ type: RouterTestingModule, | ||
| minVersion: "14.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -53,3 +53,3 @@ type: RouterTestingModule, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -67,3 +67,3 @@ type: RouterTestingModule, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -104,3 +104,3 @@ type: RouterTestingModule, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -113,3 +113,3 @@ type: RootFixtureService, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -122,3 +122,3 @@ type: RootFixtureService, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -140,3 +140,3 @@ type: RootFixtureService, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -149,3 +149,3 @@ type: RootCmp, | ||
| minVersion: "14.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| type: RootCmp, | ||
@@ -175,3 +175,3 @@ isStandalone: true, | ||
| minVersion: "12.0.0", | ||
| version: "21.1.0-next.4", | ||
| version: "21.1.0-rc.0", | ||
| ngImport: i0, | ||
@@ -178,0 +178,0 @@ type: RootCmp, |
| /** | ||
| * @license Angular v21.1.0-next.4 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
| * @license Angular v21.1.0-rc.0 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
| * License: MIT | ||
@@ -5,0 +5,0 @@ */ |
+1
-1
| The MIT License | ||
| Copyright (c) 2010-2025 Google LLC. https://angular.dev/license | ||
| Copyright (c) 2010-2026 Google LLC. https://angular.dev/license | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
+4
-4
| { | ||
| "name": "@angular/router", | ||
| "version": "21.1.0-next.4", | ||
| "version": "21.1.0-rc.0", | ||
| "description": "Angular - the routing library", | ||
@@ -30,5 +30,5 @@ "keywords": [ | ||
| "peerDependencies": { | ||
| "@angular/core": "21.1.0-next.4", | ||
| "@angular/common": "21.1.0-next.4", | ||
| "@angular/platform-browser": "21.1.0-next.4", | ||
| "@angular/core": "21.1.0-rc.0", | ||
| "@angular/common": "21.1.0-rc.0", | ||
| "@angular/platform-browser": "21.1.0-rc.0", | ||
| "rxjs": "^6.5.3 || ^7.4.0" | ||
@@ -35,0 +35,0 @@ }, |
+110
-63
| /** | ||
| * @license Angular v21.1.0-next.4 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
| * @license Angular v21.1.0-rc.0 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
| * License: MIT | ||
| */ | ||
| 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'; | ||
| 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'; | ||
| import { RouterOutletContract, ActivatedRoute, ActivatedRouteSnapshot, Params, DefaultUrlSerializer, UrlTree, 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'; | ||
| 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, destroyDetachedRouteHandle, isActive, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, RestoredState as ɵRestoredState } from './_router_module-chunk.js'; | ||
| import { Title } from '@angular/platform-browser'; | ||
@@ -16,2 +16,46 @@ import * as i0 from '@angular/core'; | ||
| /** | ||
| * Store contextual information about a `RouterOutlet` | ||
| * | ||
| * @publicApi | ||
| */ | ||
| declare class OutletContext { | ||
| private readonly rootInjector; | ||
| outlet: RouterOutletContract | null; | ||
| route: ActivatedRoute | null; | ||
| children: ChildrenOutletContexts; | ||
| attachRef: ComponentRef<any> | null; | ||
| get injector(): EnvironmentInjector; | ||
| constructor(rootInjector: EnvironmentInjector); | ||
| } | ||
| /** | ||
| * Store contextual information about the children (= nested) `RouterOutlet` | ||
| * | ||
| * @publicApi | ||
| */ | ||
| declare class ChildrenOutletContexts { | ||
| private rootInjector; | ||
| private contexts; | ||
| /** @docs-private */ | ||
| constructor(rootInjector: EnvironmentInjector); | ||
| /** Called when a `RouterOutlet` directive is instantiated */ | ||
| onChildOutletCreated(childName: string, outlet: RouterOutletContract): void; | ||
| /** | ||
| * Called when a `RouterOutlet` directive is destroyed. | ||
| * We need to keep the context as the outlet could be destroyed inside a NgIf and might be | ||
| * re-created later. | ||
| */ | ||
| onChildOutletDestroyed(childName: string): void; | ||
| /** | ||
| * Called when the corresponding route is deactivated during navigation. | ||
| * Because the component get destroyed, all children outlet are destroyed. | ||
| */ | ||
| onOutletDeactivated(): Map<string, OutletContext>; | ||
| onOutletReAttached(contexts: Map<string, OutletContext>): void; | ||
| getOrCreateContext(childName: string): OutletContext; | ||
| getContext(childName: string): OutletContext | null; | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<ChildrenOutletContexts, never>; | ||
| static ɵprov: i0.ɵɵInjectableDeclaration<ChildrenOutletContexts>; | ||
| } | ||
| /** | ||
| * Creates a `UrlTree` relative to an `ActivatedRouteSnapshot`. | ||
@@ -73,46 +117,2 @@ * | ||
| /** | ||
| * Store contextual information about a `RouterOutlet` | ||
| * | ||
| * @publicApi | ||
| */ | ||
| declare class OutletContext { | ||
| private readonly rootInjector; | ||
| outlet: RouterOutletContract | null; | ||
| route: ActivatedRoute | null; | ||
| children: ChildrenOutletContexts; | ||
| attachRef: ComponentRef<any> | null; | ||
| get injector(): EnvironmentInjector; | ||
| constructor(rootInjector: EnvironmentInjector); | ||
| } | ||
| /** | ||
| * Store contextual information about the children (= nested) `RouterOutlet` | ||
| * | ||
| * @publicApi | ||
| */ | ||
| declare class ChildrenOutletContexts { | ||
| private rootInjector; | ||
| private contexts; | ||
| /** @docs-private */ | ||
| constructor(rootInjector: EnvironmentInjector); | ||
| /** Called when a `RouterOutlet` directive is instantiated */ | ||
| onChildOutletCreated(childName: string, outlet: RouterOutletContract): void; | ||
| /** | ||
| * Called when a `RouterOutlet` directive is destroyed. | ||
| * We need to keep the context as the outlet could be destroyed inside a NgIf and might be | ||
| * re-created later. | ||
| */ | ||
| onChildOutletDestroyed(childName: string): void; | ||
| /** | ||
| * Called when the corresponding route is deactivated during navigation. | ||
| * Because the component get destroyed, all children outlet are destroyed. | ||
| */ | ||
| onOutletDeactivated(): Map<string, OutletContext>; | ||
| onOutletReAttached(contexts: Map<string, OutletContext>): void; | ||
| getOrCreateContext(childName: string): OutletContext; | ||
| getContext(childName: string): OutletContext | null; | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<ChildrenOutletContexts, never>; | ||
| static ɵprov: i0.ɵɵInjectableDeclaration<ChildrenOutletContexts>; | ||
| } | ||
| /** | ||
| * Options to configure the View Transitions integration in the Router. | ||
@@ -431,10 +431,31 @@ * | ||
| /** | ||
| * Enables the use of the browser's `History` API for navigation. | ||
| * A type alias for providers returned by `withExperimentalPlatformNavigation` for use with `provideRouter`. | ||
| * | ||
| * @see {@link withExperimentalPlatformNavigation} | ||
| * @see {@link provideRouter} | ||
| * | ||
| * @experimental 21.1 | ||
| */ | ||
| type ExperimentalPlatformNavigationFeature = RouterFeature<RouterFeatureKind.ExperimentalPlatformNavigationFeature>; | ||
| /** | ||
| * Enables interop with the browser's `Navigation` API for router navigations. | ||
| * | ||
| * @description | ||
| * This function provides a `Location` strategy that uses the browser's `History` API. | ||
| * It is required when using features that rely on `history.state`. For example, the | ||
| * `state` object in `NavigationExtras` is passed to `history.pushState` or | ||
| * `history.replaceState`. | ||
| * | ||
| * CRITICAL: This feature is _highly_ experimental and should not be used in production. Browser support | ||
| * is limited and in active development. Use only for experimentation and feedback purposes. | ||
| * | ||
| * This function provides a `Location` strategy that uses the browser's `Navigation` API. | ||
| * By using the platform's Navigation APIs, the Router is able to provide native | ||
| * browser navigation capabilities. Some advantages include: | ||
| * | ||
| * - The ability to intercept navigations triggered outside the Router. This allows plain anchor | ||
| * elements _without_ `RouterLink` directives to be intercepted by the Router and converted to SPA navigations. | ||
| * - Native scroll and focus restoration support by the browser, without the need for custom implementations. | ||
| * - Communication of ongoing navigations to the browser, enabling built-in features like | ||
| * accessibility announcements, loading indicators, stop buttons, and performance measurement APIs. | ||
| * NOTE: Deferred entry updates are not part of the interop 2025 Navigation API commitments so the "ongoing navigation" | ||
| * communication support is limited. | ||
| * | ||
| * @usageNotes | ||
@@ -449,3 +470,3 @@ * | ||
| * providers: [ | ||
| * provideRouter(appRoutes, withPlatformNavigation()) | ||
| * provideRouter(appRoutes, withExperimentalPlatformNavigation()) | ||
| * ] | ||
@@ -455,5 +476,10 @@ * }); | ||
| * | ||
| * @see https://github.com/WICG/navigation-api?tab=readme-ov-file#problem-statement | ||
| * @see https://developer.chrome.com/docs/web-platform/navigation-api/ | ||
| * @see https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API | ||
| * | ||
| * @experimental 21.1 | ||
| * @returns A `RouterFeature` that enables the platform navigation. | ||
| */ | ||
| declare function withPlatformNavigation(): RouterFeature<RouterFeatureKind.InMemoryScrollingFeature>; | ||
| declare function withExperimentalPlatformNavigation(): ExperimentalPlatformNavigationFeature; | ||
| /** | ||
@@ -737,2 +763,26 @@ * A type alias for providers returned by `withEnabledBlockingInitialNavigation` for use with | ||
| /** | ||
| * A type alias for providers returned by `withExperimentalAutoCleanupInjectors` for use with `provideRouter`. | ||
| * | ||
| * @see {@link withExperimentalAutoCleanupInjectors} | ||
| * @see {@link provideRouter} | ||
| * | ||
| * @experimental 21.1 | ||
| */ | ||
| type ExperimentalAutoCleanupInjectorsFeature = RouterFeature<RouterFeatureKind.ExperimentalAutoCleanupInjectorsFeature>; | ||
| /** | ||
| * Enables automatic destruction of unused route injectors. | ||
| * | ||
| * @description | ||
| * | ||
| * When enabled, the router will automatically destroy `EnvironmentInjector`s associated with `Route`s | ||
| * that are no longer active or stored by the `RouteReuseStrategy`. | ||
| * | ||
| * This feature is opt-in and requires `RouteReuseStrategy.shouldDestroyInjector` to return `true` | ||
| * for the routes that should be destroyed. If the `RouteReuseStrategy` uses stored handles, it | ||
| * should also implement `retrieveStoredHandle` to ensure we don't destroy injectors for handles that will be reattached. | ||
| * | ||
| * @experimental 21.1 | ||
| */ | ||
| declare function withExperimentalAutoCleanupInjectors(): ExperimentalAutoCleanupInjectorsFeature; | ||
| /** | ||
| * A type alias for providers returned by `withComponentInputBinding` for use with `provideRouter`. | ||
@@ -833,3 +883,3 @@ * | ||
| */ | ||
| type RouterFeatures = PreloadingFeature | DebugTracingFeature | InitialNavigationFeature | InMemoryScrollingFeature | RouterConfigurationFeature | NavigationErrorHandlerFeature | ComponentInputBindingFeature | ViewTransitionsFeature | RouterHashLocationFeature; | ||
| type RouterFeatures = PreloadingFeature | DebugTracingFeature | InitialNavigationFeature | InMemoryScrollingFeature | RouterConfigurationFeature | NavigationErrorHandlerFeature | ComponentInputBindingFeature | ViewTransitionsFeature | ExperimentalAutoCleanupInjectorsFeature | RouterHashLocationFeature | ExperimentalPlatformNavigationFeature; | ||
| /** | ||
@@ -848,3 +898,5 @@ * The list of features as an enum to uniquely type each feature. | ||
| ComponentInputBindingFeature = 8, | ||
| ViewTransitionsFeature = 9 | ||
| ViewTransitionsFeature = 9, | ||
| ExperimentalAutoCleanupInjectorsFeature = 10, | ||
| ExperimentalPlatformNavigationFeature = 11 | ||
| } | ||
@@ -959,8 +1011,3 @@ | ||
| /** | ||
| * Provides a way to use the synchronous version of the recognize function using rxjs. | ||
| */ | ||
| declare function provideSometimesSyncRecognize(): EnvironmentProviders; | ||
| 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 }; | ||
| 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, withExperimentalAutoCleanupInjectors, withExperimentalPlatformNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, withViewTransitions, afterNextNavigation as ɵafterNextNavigation, loadChildren as ɵloadChildren }; | ||
| export type { ComponentInputBindingFeature, DebugTracingFeature, DisabledInitialNavigationFeature, EnabledBlockingInitialNavigationFeature, InMemoryScrollingFeature, InitialNavigationFeature, NavigationErrorHandlerFeature, PreloadingFeature, RouterConfigurationFeature, RouterFeature, RouterFeatures, RouterHashLocationFeature, ViewTransitionInfo, ViewTransitionsFeature, ViewTransitionsFeatureOptions }; |
| /** | ||
| * @license Angular v21.1.0-next.4 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
| * @license Angular v21.1.0-rc.0 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
| * License: MIT | ||
@@ -5,0 +5,0 @@ */ |
| /** | ||
| * @license Angular v21.1.0-next.4 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
| * @license Angular v21.1.0-rc.0 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
| * License: MIT | ||
@@ -5,0 +5,0 @@ */ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
22
-8.33%1173391
-3.72%11604
-2.11%