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