Angular 14.2
We have a new minor release for Angular with version 14.2. Minor means no breaking changes but new features. With NgOptimizedImage, we get a new directive, that applies best practices to the loading process of images.
To enable it, replace the src attribute with rawSrc. By default, all images are now lazy-loaded. So you have to make sure to put the priority attribute on those visible within the viewport. If you miss one, no problem, the new directive will tell you that via a warning message.
NgOptimizedImage also ensures that all necessary image attributes are set, it provides support for loading them via a CDN, and we can look forward to further useful functions in the future.
Next to that, Angular continues to extend the "standaloneability" of its API. This time it is the Router and Angular Elements. The provideRouter function is the standalone version of the RouterModule. And Router-specific directives, like routerLink are now also standalone.
Further reading:
- Cédric Exbrayat: What's new in Angular 14.2
- Kara Erickson & Leena Sohoni: Optimizing Image with the Angular Image Directive
- Netanel Basal: Using Angular NgOptimizedImage to Implement Image Loading Best Practices
NgRx 14.3
We've also seen a minor release of NgRx, a state management library, to 14.3. It is also about providing standalone functions for all its features where we had to use an NgModule in the past.
TypeScript 4.8
The latest version of TypeScript comes with improvements in the area of type narrowing and union types.
Jest 29
The new major of Jest comes with breaking changes but according to its authors, the migration ought to be very smooth.
Top comments (0)