What new in Angular 15 features and benefits

A few improvements landed in Angular v15. Now Angular 15 can allow developers to build Angular applications without any module.

 

The HTTP support evolved, and we can now use provideHttpClient to provide HttpClient without using HttpClientModule

 

Dependency Injection >

The providedIn: NgModule syntax of the @Injectable() decorator is now deprecated.

The providedIn: 'any' syntax is also deprecated.

 

Router >

The router now auto-unwraps default exports from lazy-loaded modules, routes or components.

//for children

loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule)

 

//for routes

loadChildren: () => import('./admin/admin.routes').then(c => c.adminRoutes)

 

// for component

loadComponent: () => import('./admin/admin.component').then(m => m.AdminComponent)

 

 

Forms >

Some utility functions have been added to the forms package: isFormControl, isFormGroup, isFormRecord, isFormArray.

 

Common>

The DATE_PIPE_DEFAULT_TIMEZONE is deprecated and added DATE_PIPE_DEFAULT_OPTIONS.

 

Devtools >

The devtools now allow you to inspect the source code of a directive

 

NgOptimizedImage is stable










ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

www.code-sample.com/. Powered by Blogger.
^