You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@angular/router

Package Overview
Dependencies
Maintainers
2
Versions
1034
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/router - npm Package Compare versions

Comparing version
21.2.0
to
21.2.1
+35
-31
fesm2022/_router_module-chunk.mjs
/**
* @license Angular v21.2.0
* @license Angular v21.2.1
* (c) 2010-2026 Google LLC. https://angular.dev/

@@ -48,3 +48,3 @@ * License: MIT

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -57,3 +57,3 @@ type: ReactiveRouterState,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -66,3 +66,3 @@ type: ReactiveRouterState,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -320,3 +320,3 @@ type: ReactiveRouterState,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -342,3 +342,3 @@ type: RouterLink,

minVersion: "16.1.0",
version: "21.2.0",
version: "21.2.1",
type: RouterLink,

@@ -375,3 +375,3 @@ isStandalone: true,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -554,3 +554,3 @@ type: RouterLink,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -571,3 +571,3 @@ type: RouterLinkActive,

minVersion: "14.0.0",
version: "21.2.0",
version: "21.2.1",
type: RouterLinkActive,

@@ -596,3 +596,3 @@ isStandalone: true,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -649,3 +649,3 @@ type: RouterLinkActive,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -658,3 +658,3 @@ type: PreloadAllModules,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -667,3 +667,3 @@ type: PreloadAllModules,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -684,3 +684,3 @@ type: PreloadAllModules,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -693,3 +693,3 @@ type: NoPreloading,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -702,3 +702,3 @@ type: NoPreloading,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -784,3 +784,3 @@ type: NoPreloading,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -801,3 +801,3 @@ type: RouterPreloader,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -810,3 +810,3 @@ type: RouterPreloader,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -913,3 +913,3 @@ type: RouterPreloader,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -922,3 +922,3 @@ type: RouterScroller,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -930,3 +930,3 @@ type: RouterScroller

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -1189,3 +1189,7 @@ type: RouterScroller,

interceptOptions.precommitHandler = controller => {
resolve(controller.redirect.bind(controller));
if (this.navigation.transition?.navigationType === 'traverse') {
resolve(() => {});
} else {
resolve(controller.redirect.bind(controller));
}
return precommitHandlerPromise;

@@ -1234,7 +1238,7 @@ };

deferredCommitSupported(event) {
return this.precommitHandlerSupported && event.cancelable && event.navigationType !== 'traverse';
return this.precommitHandlerSupported && event.cancelable;
}
static ɵfac = i0.ɵɵngDeclareFactory({
minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -1247,3 +1251,3 @@ type: NavigationStateManager,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -1256,3 +1260,3 @@ type: NavigationStateManager,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -1556,3 +1560,3 @@ type: NavigationStateManager,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -1565,3 +1569,3 @@ type: RouterModule,

minVersion: "14.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -1574,3 +1578,3 @@ type: RouterModule,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -1582,3 +1586,3 @@ type: RouterModule

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -1585,0 +1589,0 @@ type: RouterModule,

/**
* @license Angular v21.2.0
* @license Angular v21.2.1
* (c) 2010-2026 Google LLC. https://angular.dev/

@@ -31,5 +31,5 @@ * License: MIT

const VERSION = /* @__PURE__ */new Version('21.2.0');
const VERSION = /* @__PURE__ */new Version('21.2.1');
export { VERSION, mapToCanActivate, mapToCanActivateChild, mapToCanDeactivate, mapToCanMatch, mapToResolve };
//# sourceMappingURL=router.mjs.map

@@ -1,1 +0,1 @@

{"version":3,"file":"router.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/router/src/utils/functional_guards.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/router/src/version.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 {inject, Type} from '@angular/core';\n\nimport {\n CanActivate,\n CanActivateChild,\n CanActivateChildFn,\n CanActivateFn,\n CanDeactivate,\n CanDeactivateFn,\n CanMatch,\n CanMatchFn,\n Resolve,\n ResolveFn,\n} from '../models';\n\n/**\n * Maps an array of injectable classes with canMatch functions to an array of equivalent\n * `CanMatchFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanMatch(providers: Array<Type<CanMatch>>): CanMatchFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canMatch(...params),\n );\n}\n\n/**\n * Maps an array of injectable classes with canActivate functions to an array of equivalent\n * `CanActivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanActivate(providers: Array<Type<CanActivate>>): CanActivateFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canActivate(...params),\n );\n}\n/**\n * Maps an array of injectable classes with canActivateChild functions to an array of equivalent\n * `CanActivateChildFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanActivateChild(\n providers: Array<Type<CanActivateChild>>,\n): CanActivateChildFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canActivateChild(...params),\n );\n}\n/**\n * Maps an array of injectable classes with canDeactivate functions to an array of equivalent\n * `CanDeactivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanDeactivate<T = unknown>(\n providers: Array<Type<CanDeactivate<T>>>,\n): CanDeactivateFn<T>[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canDeactivate(...params),\n );\n}\n/**\n * Maps an injectable class with a resolve function to an equivalent `ResolveFn`\n * for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='Resolve'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToResolve<T>(provider: Type<Resolve<T>>): ResolveFn<T> {\n return (...params) => inject(provider).resolve(...params);\n}\n","/**\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\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = /* @__PURE__ */ new Version('21.2.0');\n"],"names":["mapToCanMatch","providers","map","provider","params","inject","canMatch","mapToCanActivate","canActivate","mapToCanActivateChild","canActivateChild","mapToCanDeactivate","canDeactivate","mapToResolve","resolve","VERSION","Version"],"mappings":";;;;;;;;;;;;;;AAgCM,SAAUA,aAAaA,CAACC,SAAgC,EAAA;EAC5D,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACG,QAAQ,CAAC,GAAGF,MAAM,CAAC,CACzC;AACH;AAWM,SAAUG,gBAAgBA,CAACN,SAAmC,EAAA;EAClE,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACK,WAAW,CAAC,GAAGJ,MAAM,CAAC,CAC5C;AACH;AAUM,SAAUK,qBAAqBA,CACnCR,SAAwC,EAAA;EAExC,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACO,gBAAgB,CAAC,GAAGN,MAAM,CAAC,CACjD;AACH;AAUM,SAAUO,kBAAkBA,CAChCV,SAAwC,EAAA;EAExC,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACS,aAAa,CAAC,GAAGR,MAAM,CAAC,CAC9C;AACH;AAUM,SAAUS,YAAYA,CAAIV,QAA0B,EAAA;AACxD,EAAA,OAAO,CAAC,GAAGC,MAAM,KAAKC,MAAM,CAACF,QAAQ,CAAC,CAACW,OAAO,CAAC,GAAGV,MAAM,CAAC;AAC3D;;ACpFO,MAAMW,OAAO,kBAAmB,IAAIC,OAAO,CAAC,mBAAmB;;;;"}
{"version":3,"file":"router.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/router/src/utils/functional_guards.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/router/src/version.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 {inject, Type} from '@angular/core';\n\nimport {\n CanActivate,\n CanActivateChild,\n CanActivateChildFn,\n CanActivateFn,\n CanDeactivate,\n CanDeactivateFn,\n CanMatch,\n CanMatchFn,\n Resolve,\n ResolveFn,\n} from '../models';\n\n/**\n * Maps an array of injectable classes with canMatch functions to an array of equivalent\n * `CanMatchFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanMatch(providers: Array<Type<CanMatch>>): CanMatchFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canMatch(...params),\n );\n}\n\n/**\n * Maps an array of injectable classes with canActivate functions to an array of equivalent\n * `CanActivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanActivate(providers: Array<Type<CanActivate>>): CanActivateFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canActivate(...params),\n );\n}\n/**\n * Maps an array of injectable classes with canActivateChild functions to an array of equivalent\n * `CanActivateChildFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanActivateChild(\n providers: Array<Type<CanActivateChild>>,\n): CanActivateChildFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canActivateChild(...params),\n );\n}\n/**\n * Maps an array of injectable classes with canDeactivate functions to an array of equivalent\n * `CanDeactivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanDeactivate<T = unknown>(\n providers: Array<Type<CanDeactivate<T>>>,\n): CanDeactivateFn<T>[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canDeactivate(...params),\n );\n}\n/**\n * Maps an injectable class with a resolve function to an equivalent `ResolveFn`\n * for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='Resolve'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToResolve<T>(provider: Type<Resolve<T>>): ResolveFn<T> {\n return (...params) => inject(provider).resolve(...params);\n}\n","/**\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\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = /* @__PURE__ */ new Version('21.2.1');\n"],"names":["mapToCanMatch","providers","map","provider","params","inject","canMatch","mapToCanActivate","canActivate","mapToCanActivateChild","canActivateChild","mapToCanDeactivate","canDeactivate","mapToResolve","resolve","VERSION","Version"],"mappings":";;;;;;;;;;;;;;AAgCM,SAAUA,aAAaA,CAACC,SAAgC,EAAA;EAC5D,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACG,QAAQ,CAAC,GAAGF,MAAM,CAAC,CACzC;AACH;AAWM,SAAUG,gBAAgBA,CAACN,SAAmC,EAAA;EAClE,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACK,WAAW,CAAC,GAAGJ,MAAM,CAAC,CAC5C;AACH;AAUM,SAAUK,qBAAqBA,CACnCR,SAAwC,EAAA;EAExC,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACO,gBAAgB,CAAC,GAAGN,MAAM,CAAC,CACjD;AACH;AAUM,SAAUO,kBAAkBA,CAChCV,SAAwC,EAAA;EAExC,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACS,aAAa,CAAC,GAAGR,MAAM,CAAC,CAC9C;AACH;AAUM,SAAUS,YAAYA,CAAIV,QAA0B,EAAA;AACxD,EAAA,OAAO,CAAC,GAAGC,MAAM,KAAKC,MAAM,CAACF,QAAQ,CAAC,CAACW,OAAO,CAAC,GAAGV,MAAM,CAAC;AAC3D;;ACpFO,MAAMW,OAAO,kBAAmB,IAAIC,OAAO,CAAC,mBAAmB;;;;"}
/**
* @license Angular v21.2.0
* @license Angular v21.2.1
* (c) 2010-2026 Google LLC. https://angular.dev/

@@ -36,3 +36,3 @@ * License: MIT

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -45,3 +45,3 @@ type: RouterTestingModule,

minVersion: "14.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -53,3 +53,3 @@ type: RouterTestingModule,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -67,3 +67,3 @@ type: RouterTestingModule,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -104,3 +104,3 @@ type: RouterTestingModule,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -113,3 +113,3 @@ type: RootFixtureService,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -122,3 +122,3 @@ type: RootFixtureService,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -140,3 +140,3 @@ type: RootFixtureService,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -149,3 +149,3 @@ type: RootCmp,

minVersion: "14.0.0",
version: "21.2.0",
version: "21.2.1",
type: RootCmp,

@@ -175,3 +175,3 @@ isStandalone: true,

minVersion: "12.0.0",
version: "21.2.0",
version: "21.2.1",
ngImport: i0,

@@ -178,0 +178,0 @@ type: RootCmp,

/**
* @license Angular v21.2.0
* @license Angular v21.2.1
* (c) 2010-2026 Google LLC. https://angular.dev/

@@ -4,0 +4,0 @@ * License: MIT

{
"name": "@angular/router",
"version": "21.2.0",
"version": "21.2.1",
"description": "Angular - the routing library",

@@ -30,5 +30,5 @@ "keywords": [

"peerDependencies": {
"@angular/core": "21.2.0",
"@angular/common": "21.2.0",
"@angular/platform-browser": "21.2.0",
"@angular/core": "21.2.1",
"@angular/common": "21.2.1",
"@angular/platform-browser": "21.2.1",
"rxjs": "^6.5.3 || ^7.4.0"

@@ -35,0 +35,0 @@ },

/**
* @license Angular v21.2.0
* @license Angular v21.2.1
* (c) 2010-2026 Google LLC. https://angular.dev/

@@ -4,0 +4,0 @@ * License: MIT

/**
* @license Angular v21.2.0
* @license Angular v21.2.1
* (c) 2010-2026 Google LLC. https://angular.dev/

@@ -4,0 +4,0 @@ * License: MIT

/**
* @license Angular v21.2.0
* @license Angular v21.2.1
* (c) 2010-2026 Google LLC. https://angular.dev/

@@ -4,0 +4,0 @@ * License: MIT

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