Angular 15, the most recent model of the Google-developed, TypeScript-based net software framework, has simply been launched. The replace options now-stable, “standalone” APIs that enable builders to construct purposes with out utilizing NgModules.
Angular 15 was formally unveiled on November 16. The standalone APIs, launched as a developer preview in Angular 14 in June, let builders bootstrap an software utilizing a single element. They work in HttpClient
, Angular Components, router, and elsewhere. Standalone elements are meant to simplify improvement and function a substitute for NgModules, a method of managing dependencies that builders considered as unnecessarily complicated.
Additionally in Angular 15, a brand new directive composition API guarantees to reinforce code reuse. It permits builders to reinforce host components with directives and suits Angular with a code reuse technique. A brand new picture directive, now secure, provides options resembling computerized srcset
technology, to make sure an appropriately sized picture, and experimental fill mode, to trigger a picture to fill its father or mother container, eradicating the requirement to declare the picture’s top and width. The standalone NgOptimizedImage
can be utilized immediately in a element or NgModule.
Directions for getting began with Angular could be discovered on GitHub.
Angular 15 additionally consists of the next options and enhancements:
- Improved stack traces for debugging.
- Materials Design Parts for Net (MDC), now secure.
- Vary choice assist within the slider and a density customization API for elements.
- Element Dev Package (CDK) provides a CDK listbox primitive.
- Enhancements to the experimental assist for the ESbuild JavaScript bundler, with experimental backing for Sass, SVG template, file substitute, and
ng – watch
. - The Angular CLI allows you to generate a brand new standalone element, through
ng g element –- standalone
. And the output ofng new
has been simplified, eradicatingtake a look at.ts
,polyfills.ts
, andenvironments
to scale back the configuration. - Builders can globally change the default formatting configuration for
DatePipe
. - The language service now can mechanically import elements getting used on a template however that haven’t been added to a standalone element or NgModule.
Future plans for Angular embrace enhancements to the server-side rendering pipeline and reactivity together with quality-of-life enhancements.
Copyright © 2022 IDG Communications, Inc.