Skip to content

Commit 561d3de

Browse files
alan-agius4jkrems
authored andcommitted
build: update to Angular version 21
Update to Angular version 21.
1 parent 4ee05db commit 561d3de

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

constants.bzl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ RELEASE_ENGINES_NODE = "^20.19.0 || ^22.12.0 || >=24.0.0"
33
RELEASE_ENGINES_NPM = "^6.11.0 || ^7.5.6 || >=8.0.0"
44
RELEASE_ENGINES_YARN = ">= 1.13.0"
55

6-
NG_PACKAGR_VERSION = "^20.2.0-next.0"
7-
ANGULAR_FW_VERSION = "^20.2.0-next.0"
8-
ANGULAR_FW_PEER_DEP = "^20.0.0 || ^20.2.0-next.0 || ^21.0.0-next.0"
9-
NG_PACKAGR_PEER_DEP = "^20.0.0 || ^20.2.0-next.0"
6+
NG_PACKAGR_VERSION = "^21.0.0-next.0"
7+
ANGULAR_FW_VERSION = "^21.0.0-next.0"
8+
ANGULAR_FW_PEER_DEP = "^21.0.0-next.0"
9+
NG_PACKAGR_PEER_DEP = "^21.0.0-next.0"
1010

1111
# Baseline widely-available date in `YYYY-MM-DD` format which defines Angular's
1212
# browser support. This date serves as the source of truth for the Angular CLI's
1313
# default browser set used to determine what downleveling is necessary.
1414
#
1515
# See: https://web.dev/baseline
16-
BASELINE_DATE = "2025-04-30"
16+
BASELINE_DATE = "2025-08-20"
1717

1818
SNAPSHOT_REPOS = {
1919
"@angular/cli": "angular/cli-builds",

packages/angular/ssr/src/utils/ng.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,7 @@ export async function renderAngular(
100100
const envInjector = applicationRef.injector;
101101
const routerIsProvided = !!envInjector.get(ActivatedRoute, null);
102102
const router = envInjector.get(Router);
103-
104-
// TODO(alanagius): Remove the below check when version 21.0.0-next.0 is on NPM
105-
// Workaround for breaking change that landed on angular/angular main too early
106-
// https://github.com/angular/angular/pull/63057
107-
const lastSuccessfulNavigation =
108-
typeof router.lastSuccessfulNavigation === 'function'
109-
? // eslint-disable-next-line @typescript-eslint/no-explicit-any
110-
(router as any).lastSuccessfulNavigation()
111-
: router.lastSuccessfulNavigation;
103+
const lastSuccessfulNavigation = router.lastSuccessfulNavigation();
112104

113105
if (!routerIsProvided) {
114106
hasNavigationError = false;

0 commit comments

Comments
 (0)