Angular 15 Released: What Is New In The Latest Version of Angular

Angular 15 Released: What Is New In The Latest Version of Angular

Angular

Custom Angular Development

Finally, the Angular 15 latest version has rolled out with more stability and improved array codes for the developers. You can observe some exceptional updates in this brand-new version of Angular. We will also introduce you to how to upgrade to the newest edition of Angular, Angular 15. Before that, let’s dive in to find out what exactly Angular is.

What is Angular? 

Angular is a popular framework and a platform for creating single-page client applications using Typescript and HTML. It has optional and core functionalities, executed as a batch of Typescript libraries utilized in the applications. The basic unit of Angular is its components which are defined as modules. The function of NgModules is to create Functional sets, which are determined by different codings. 

Every single page client application contains a root module having extra features modules and, thus, developing bootstrapping. These angular components serve Angular in different ways. It declares views that are further selected and modified by Angular based on program data and logic. 

These views are associated with templates declared by metadata. These templates join Angular directives and basic HTML, which can modify the HTML before release. For instance, it can affect dependencies and dry runs and make the code more efficient, reusable, and modular.

What is new in Angular latest Version 15?

The new version of Angular 15 brings up new refinements and performance for the developers. Angular mostly comes up with the latest versions twice a year. This time, Angular 15 was released on November 16. So, what is new in Angular’s latest version?

It has unlocked the pipeline of supportability and stability of the Angular framework. The most significant change observed is the library of standalone components, and the old version had a single component functioning everywhere, including the router, Angular elements, and HTTP client page. 

But the library of Standalone components in the new version can handle even complex processes as an alternative to the basic units of Angular. With its standalone APIs developers now you can build an application without modules. 

Moreover, the latest version Angular 15, also offers stable standalone APIs, solid image directives, enhanced debugging and stack traces, directive configuration API, HTTP with HTTP client, and angular CLI enhancements. More things like, router unwraps default drifts, forms, reliance injection, improved practical ESbuild support, and CDK Listbox.

Here is the list of major features explained in the latest version of Angular 15:

Feature Angular 14 Angular 15
Standalone APIs Less stable  More stable
Directive configuration of API Less host elements Increased host elements along with directives
MDC based components MDS was unavailable. It was complex to refract component-based materials. More stable MDC-based components 
CDK Listbox A specific list of primitives for building UI components Introduction of @angular/cdk/listbox based on WAI ARIA listbox for focus management, keyboard interacting and bidi layout support
Debugging  No information can be received about the source of the error. Smooth debugging and linked stack traces.
Image directives Upto 75% enhanced in LCP (Largest contentful paint)  Added features include file mode (experimental) and automatic srcset.

Stable Standalone APIs

In Angular version 14, a rich library of stable standalone APIs lets the Angularjs developers create angular applications without any need of ng modules. A developer has not had to worry about repeatedly previewing the whole component, and its stable API library streamlines the creation experience and simplifies the development processes. 

The new Angular 15 version has more stable and convenient application formation methods. These standalone APIs allow working in routers, angular elements, and HTTP clients, and it uses only a single component to bootstrap the angular application conveniently.

Directive configuration API

Another feature of this new Angular 15 update is the directive configuration API quite similar to requests on GitHub. It furnishes a special ability to the developers, allowing them to add directives to several host elements. As a result, it elevates the usability of codes.

Voluntary imports in language services

HTTP with providing HTTP client

With the HTTP providing HTTP client feature, you can choose among adopting HTTP support, it’s evolution and modules. HTTP interceptors are now playing the role of functions in the new version of Angular 15.

Angular CLI enhancements

CLI supports the standalone stable APIs. You have to remove environments, polyfills.ts, and test.ts to develop the Angular CLI enhancements.

Enhanced debugging and stack traces

Developers have been facing many difficulties in debugging and stack traces. The Angular team went through all the issues and queries and brought the enhanced debugging and stack traces. Angular 14 used to depend upon third parties for displaying errors. But the new Angular 15 is more competent in detecting stack errors. Angular 15 now integrates with Chrome dev tools to deal with debugging issues. AppComponent here allows execution using button presses.

Solid image directives

The solid image directive feature is known to enhance the quality of Angular 15 by up to 75%. You can accomplish the best LCP score using solid image directives in the lighthouse. The two major image directives sub-features include:

  • Fill mode [experimental]

You do not need to mention the image’s height and width with Fill mode, and it provides a parent container whose height and width are already in the memory. The tool is helpful in case of its applications in CSS background. To use this feature and the component, you must replace src with ngSrc and align it with the priority character.

  • Automatic Generation of srcset

This feature automatically generates a srcset which takes care of the exact size of visual images. You only need to download a single image a few times to perform different operations on one image.

Benchmarking/ Syntax and Codes Differences

Angular has a list of benchmarks that runs across every code for enhanced performance. The recent version doesn’t regress during runtime whenever the code changes. It supports the typescript version greater than 4.8. Moreover, there were several syntax and codes in Angular 14 which doesn’t support in Angular 15. 

For instance, Angular 15 has disabled node.js versions 14.[15-19].x or 16.[10-12].x. 

Instead, Angular 15 supports node.js version: 14.20.x, 16.13.x and 18.10.x versions.

CDK Listbox

CDK (Component Development Kit) Listbox furnishes a huge assembly of behavioral primitives for forming new UI components. @angular/CDK/Listbox provides directives to create your Listbox interactions depending upon the specific WAI-ARIA pattern of the Listbox. 

It integrates host elements with ARIA roles. Attention management, keyboard interaction, and bidi layout are a few of the exclusive components of the component development kit Listbox.

Extended esbuild support

Angular now supports more esbuild features, such as dynamic imports and import maps.

What are the steps for upgrading to Angular 15?

  • You have to use a supported version of node.js. These versions include 18.10.x, 16.13.x, and 14.20.x. Remember to upgrade the Typescript to a 4.8 version or higher. Run ng update @angular/core@15 @angular/cli@15 in the project directory for an application update.
  • For material components, run ng update @angular/material@15. The new version disables and enables IVY from the application’s tsconfig.json. Ivy remains the only rendering unit in Angular 15.
  • To modify the component’s view encapsulation and use global style sheets, use the prefix @keyframes in the component scope along with CSS. The new version disables the old keyframes programmatically. 
  • For updating decorators, use @Directive and @Injectable. DATE_PIPE_DEFAULT_TIMEZONE disables in Angular 15. To update it, use DATE_PIPE_DEFAULT_OPTIONS.Injector. get() has also stopped working in Angular 15. You can use an Injector. get() to update it to Angular 15. 

You can update the new version of Angular, Angular 15. You can also hire angularjs developer for accurate updation and smooth functioning of Angular 15.

Wrapping Up

Hence this was all about the latest version, Angular 15. We discussed what Angular is. We all introduced you to the functions of Angular. Then we moved to the components, features and modulations of Angular 15. 

You are now aware of how to implement the new Angular 15 version in your system. So, what are you waiting for? Just install it and enjoy the smooth, fast, and enhanced services of Angular 15.

GET EXPERT ASSISTANCE
Posted on January 5, 2023 by Keyur Patel
Keyur Patel
Tags: