Upgrade from Angular v14 to Angular v15
Before updating to Angular v15 you need to check
- You are using a supported version of Node.js. Angular v15 supports Node.js versions 14.20.x, 16.13.x, and 18.10.x.
- You are using a supported version of TypeScript. Angular v15 supports TypeScript version 4.8 or later.
Follow these steps to update your application
- In the project directory of your Angular application, open a terminal or command prompt.
- Run the following command to update your application to Angular v15:
ng update @angular/core@15 @angular/cli@15
- In your application’s
tsconfig.json
file, remove theenableIvy
setting. Since Ivy is the only rendering engine in Angular v15, this setting is no longer required. - Ensure that all
ActivatedRouteSnapshot
objects in your application have atitle
property. In v15, thetitle
property is required forActivatedRouteSnapshot
. - Note that
relativeLinkResolution
is not configurable in the Router in v15. This setting was used to opt out of an earlier bug fix that is now standard. - Update instances of
TestBed.inject()
that use anInjectFlags
parameter to use anInjectOptions
parameter. TheInjectFlags
parameter is deprecated in v15. - Using
providedIn: 'any'
for an@Injectable
orInjectionToken
is deprecated in v15.
After You Update:
Once you have updated your application to v15, review your application and its interactions to ensure everything is working correctly. Make sure to test all functionalities and components to confirm that there are no regressions or unexpected behavior.
Angular 15
Angular, the popular JavaScript framework, continues its journey of updation with the release of version 15, bringing some new improvements, and new features, as well as some breaking changes and deprecations. In this article, we’ll explore the key highlights of updating your Angular applications to version 15.
Table of Content
- What’s new in Angular 15?
- Major Changes in Angular v15
- Deprecations in Angular v15
- Upgrade from Angular v14 to Angular v15
- Conclusion