Angular 15 Adds Standalone APIs
Written by Kay Ewbank   
Monday, 21 November 2022

Angular 15 has been released with improvements including better performance and the availability of new standalone APIs which enable developers to build applications without using NgModules.

Angular is an open source TypeScript-based web application framework that can be used for building JavaScript apps and dynamic web pages. Following work on its development by Google, it has gained widespread support.

angular

The main improvement for developers in the new release is the graduation of the standalone APIs introduced in preview in the previous release. These are now part of the stable API surface and the developers say they will be evolved gradually following semantic versioning. The standalone components work across Angular, and they now fully work in HttpClient, Angular Elements, and router. The APIs allow you to bootstrap an application using a single component, and there are APIs for Router, HttpClient tree-shakable, and Directive composition.

Another improvement is that the image directive is now stable. This was introduced in developer preview following its development in collaboration with Chrome Aurora. The benefit of an image directive comes from the fact that in nearly 80 percent of desktop pages, an image was the Largest Contentful Paint (LCP) element in 2021. However, only 18.74% of Angular sites had good LCP on mobile in June 2022, and the team at Chrome felt that unoptimized LCP images could be one of the primary causes of poorer LCP on Angular websites.

The Angular image directive was designed to help improve this situation. The directive offers intelligent lazy loading, meaning that images that are invisible to the user on page load (for example, below-the-fold images or hidden carousel images) can be lazy-loaded to free up browser resources to load other critical text, media, or scripts.

The directive also prioritizes critical images where there is a resource hint identifying an image as critical.

The v15 release also includes new features for the image directive, including automatic srcset generation so that an appropriately sized image is requested by generating the srcset attribute for you.  An experimental fill mode has also been included. This causes the image to fill its parent container, removing the requirement to declare the image’s width and height.

Angular 15 is available now.

angular

More Information

Angular Site

Related Articles

Angular 12 Moves Closer To Ivy

Angular 11 Released With Byelog Goal Complete

Angular 9 Moves To Ivy

Angular 8 Adds Default Differential Loading  

Angular Jumps To Version 4  

Angular 2.0.0 Launched 

AngularJS 2.0 Is Radically Different

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Go At Highest Rank Ever in TIOBE Index
20/11/2024

Go is currently in 7th place in the TIOBE Index for November 2024. Not only is this is the highest position it has ever had, it's percentage rating is almost equal to its all-time-high. Will Go contin [ ... ]



GitHub Universe AI Announcements - Copilot And Spark
30/10/2024

GitHub has announced several improvements for developers at Universe, its annual conference. Developers will get multi-model Copilot and GitHub Spark, an AI-native tool for building applications in na [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info