Angular 14: end of life and how to upgrade
Angular 14 introduced standalone components in developer preview and typed reactive forms. It has been unsupported since November 2023.
Release and support dates
Angular 14 was released in June 2022. Active support ended in November 2022 and long-term support ended in November 2023. It receives no security patches today. The dates for every major are in Angular version support and end of life.
What Angular 14 introduced
- Standalone components in developer preview. With
standalone: true, components, directives and pipes declare their own imports without an NgModule. - Typed reactive forms.
FormControl,FormGroupandFormArraycarry the types of their values. Existing forms are migrated toUntypedclasses so the change can be gradual. - Page titles in the router with
Route.titleand a customTitleStrategy. - Extended diagnostics that warn about common template mistakes, such as inverted two-way binding brackets.
- Binding to protected component members from templates.
- CLI additions:
ng completion,ng cacheandng analytics. Flags are accepted in lower kebab case only. - CDK Menu and Dialog promoted to stable.
- An experimental esbuild-based builder.
- Support for TypeScript 4.7 and ES2020 as the default target.
What needs attention when you upgrade
From 14 to 15:
- Node.js 14.20, 16.13 or 18.10 and later are required, with TypeScript 4.8 or later.
enableIvymust be removed fromtsconfig.json.- Base classes whose constructors use dependency injection need an
@Injectableor@Directivedecorator. setDisabledStateis always called when aControlValueAccessoris attached.- The compiler prefixes
@keyframesnames with the component scope, which breaks TypeScript code that relies on those names. - Angular Material 15 is based on MDC. The DOM and the CSS classes of many components change. The previous components remain available through
legacyimports. providedIn: 'any',providedInwith an NgModule andRouterLinkWithHrefare deprecated.
From 15 to 16:
- Node.js 16.14 or 18.10 and later, TypeScript 4.9.3 or later and Zone.js 0.13 or later are required.
- ngcc is removed, so libraries compiled with View Engine no longer work.
- These APIs are removed:
entryComponents,ANALYZE_FOR_ENTRY_COMPONENTS,ReflectiveInjector,renderModuleFactoryandBrowserTransferStateModule. XhrFactorymust be imported from@angular/common.- Tests get
MockPlatformLocationby default. ngTemplateOutletContexthas stricter type checking.
A short upgrade approach
- Update to the latest 14.x patch, confirm that the build and the tests pass, and commit.
- List every third-party library and check whether it was published for Ivy. This list decides how hard v16 will be.
- Run
ng update @angular/core@15 @angular/cli@15, thenng update @angular/material@15. - Review the screens that use Angular Material and fix the style overrides. Use the
legacyimports only as a temporary measure. - Update third-party libraries, fix deprecations, run the tests and release.
- Repeat for the next major. The next stop is Angular 15.
When it is worth getting help
The two steps after v14 bring two large changes: MDC-based Material components in v15 and the removal of ngcc in v16. Help is worth it if the design relies on customized Material components, if key libraries have no Ivy release, or if the team wants to adopt standalone components as part of the same effort. The plan is in Angular upgrade strategy for old versions.
More in this section
- Angular 15: end of life and how to upgrade
- Angular 16: end of life and how to upgrade
- Angular 17: end of life and how to upgrade
- Angular 18: end of life and how to upgrade
Planning a migration or a micro-frontend platform?
In a 20-minute call you describe your situation and I tell you how I'd approach it. If it isn't worth doing yet, I'll say so.
Message me on LinkedIn