Check out our upgrade guide to find out the best way to upgrade your project.
Contributing
Contributing Guidelines
Read through our contributing guidelines to learn about our submission process, coding rules and more.
Want to Help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.
Code of Conduct
Help us keep Angular open and inclusive. Please read and follow our Code of Conduct.
Currently, understanding dependency injection in Angular requires a lot of context and has been sited in our surveys as one of the largest points of confusion that our users have with the framework. This PR is the beginning of our approach to make debugging dependency injection in Angular easier.
Overview
This commit introduces injector profiler callbacks in parts of the framework to emit injector events. It also introduces a default handler for these events. This default handler parses the stream of events to construct some data structures that will support new injector debug APIs. This commit introduces one of these new APIs getInjectedServices, which will be used by DevTools to implement some DI inspecting features. See comments in injector-profiler.ts for more implementation details.
Why was this implemented with a profiler?
DI maps nicely to a stream of events.
There is the possibility of making the internal setInjectorProfiler function a public debug API in the future, so that users can implement their own handlers to debug DI events.
Will this affect runtime performance?
For production builds no. For dev builds there is some additional overhead from the default profiler handling injector events and holding debug data in memory. Logic in these handlers is minimal, WeakMaps are used for keeping track of data and constant time lookups. No loops are performed in these handlers.
Will this affect bundle size?
No. Dead code elimination should strip all the code used by this commit.
In #47167 an updateClassDeclaration call was swapped out with a createClassDeclaration which caused a regression where interface references were being retained when using a custom decorator in a project that has emitDecoratorMetadata enabled.
These changes switch back to use updateClassDeclaration.
Which @angular/* package(s) are the source of the bug?
compiler-cli
Is this a regression?
Yes
Description
Hi there,
We have been notified of a vulnerability related to JSON5 used as a transitive dependency in our Angular 13 project. I wanted to ask you if you are going to plan to have a release for version 13 by upgrading to a new version of JSON5 ?
Please provide a link to a minimal reproduction of the bug
Which @angular/* package(s) are relevant/related to the feature request?
No response
Description
Would like to suggest Angular to be able to handle JWT automatically, just like it does for CSRF protection. It would be good for Angular to have this built-in, rather than rely on third party solution.
Proposed solution
Upon receiving request containing "Authorization" header, Angular can simply extract its value, and later automatically include an "Authorization" header in the response for all further requests. Of course there could be settings to enable or disable this auto feature
Alternatives considered
Currently the way is to manually write typescript code in the login component to extract the "Authorization" header after successfully login, and manually write code in my custom interceptor class to include the same header and value to all requests (except for specific request, such as accessing login input page)
| Commit | Description |
| -- | -- |
| | Add BrowserPlatformLocation to the public API (#48488) |
| | Fix TestBed.overrideProvider type to include multi (#48424) |
| | Update Location to get a normalized URL valid in case a represented URL starts with the substring equals APP_BASE_HREF (#48394) |
Alan Agius, Andrew Kushnir, Andrew Scott, Aristeidis Bampakos, Bob Watson, BrowserPerson, Jens, Jessica Janiuk, Joey Perrott, JoostK, Konstantin Kharitonov, Lukas Matta, Matthieu Riegler, Piotr Kowalski, Virginia Dooley, Yannick Baron, dario-piotrowicz, lsst25, piyush132000 and why520crazy
| Commit | Description |
| -- | -- |
| | Fix TestBed.overrideProvider type to include multi (#48424) |
| | Update Location to get a normalized URL valid in case a represented URL starts with the substring equals APP_BASE_HREF (#48394) |
Alan Agius, Andrew Kushnir, Andrew Scott, Aristeidis Bampakos, Bob Watson, BrowserPerson, Jens, Jessica Janiuk, Joey Perrott, JoostK, Konstantin Kharitonov, Lukas Matta, Piotr Kowalski, Virginia Dooley, Yannick Baron, dario-piotrowicz, lsst25, piyush132000 and why520crazy
| Commit | Description |
| -- | -- |
| | Produce diagnostic rather than crash when using invalid hostDirective (#48314) |
core
| Commit | Description |
| -- | -- |
| | Make the isStandalone() function available in public API (#48114) |
| | support TypeScript 4.9 (#48005) |
| | unable to inject ChangeDetectorRef inside host directives (#48355) |
Special Thanks
Alan Agius, Alex Castle, Andrew Kushnir, Andrew Scott, Bob Watson, Charles Lyding, Derek Cormier, Joey Perrott, Konstantin Kharitonov, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, dario-piotrowicz, piyush132000 and sr5434
Alan Agius, Alex Castle, Andrew Kushnir, Andrew Scott, Bob Watson, Derek Cormier, Joey Perrott, Konstantin Kharitonov, Kristiyan Kostadinov, Paul Gschwendtner, Pawel Kozlowski, dario-piotrowicz and piyush132000
Alan Agius, Andrew Scott, Aristeidis Bampakos, Bob Watson, Derek Cormier, Dylan Hunn, JoostK, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Rokas Brazdžionis and piyush132000
| Commit | Description |
| -- | -- |
| | accept inheriting the constructor from a class in a library (#48156) |
Special Thanks
Alan Agius, Andrew Scott, Aristeidis Bampakos, Bob Watson, Derek Cormier, JoostK, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Rokas Brazdžionis, mgechev and piyush132000
The following strategies are meant to be configured by registering the
application strategy in DI via the providers in the root NgModule or
bootstrapApplication:
routeReuseStrategy
titleStrategy
urlHandlingStrategy
The following options are meant to be configured using the options
available in RouterModule.forRoot or provideRouter.
onSameUrlNavigation
paramsInheritanceStrategy
urlUpdateStrategy
canceledNavigationResolution
The following options are available in RouterModule.forRoot but not
available in provideRouter:
malformedUriErrorHandler - This was found to not be used anywhere
internally.
errorHandler - Developers can instead subscribe to Router.events
and filter for NavigationError.
| Commit | Description |
| -- | -- |
| | Add TestBed.runInInjectionContext to help test functions which use inject (#47955) |
forms
| Commit | Description |
| -- | -- |
| | don't mutate validators array (#47830) |
| | FormBuilder.group return right type with shorthand parameters. (#48084) |
language-service
| Commit | Description |
| -- | -- |
| | Allow auto-imports to suggest multiple possible imports. (#47787) |
| | correctly handle host directive inputs/outputs (#48147) |
| | Prevent crashes on unemitable references (#47938) |
| | update packages/language-service/build.sh script to work with vscode-ng-language-service's new Bazel build (#48120) |
router
| Commit | Description |
| -- | -- |
| | Deprecate public members of Router that are meant to be configured elsewhere (#48006) |
| | Add new NavigationSkipped event for ignored navigations (#48024) |
| | correct type of nextState parameter in canDeactivate (#48038) |
| | Ensure renavigating in component init works with enabledBlocking (#48063) |
| | restore 'history.state' on popstate even if navigationId missing (#48033) |
Special Thanks
Alan Agius, Andrew Kushnir, Andrew Scott, Bjarki, Bob Watson, Brooke, Derek Cormier, Dylan Hunn, George Kalpakas, Greg Magolan, Ikko Ashimine, Ivan Rodriguez, Jessica Janiuk, JiaLiPassion, Joe Roxbury, Joey Perrott, Kristiyan Kostadinov, Matthieu Riegler, Mikhail Savchuk, Nebojsa Cvetkovic, Pawel Kozlowski, Volodymyr, Wooshaah and mgechev
| Commit | Description |
| -- | -- |
| | don't mutate validators array (#47830) |
| | FormBuilder.group return right type with shorthand parameters. (#48084) |
language-service
| Commit | Description |
| -- | -- |
| | correctly handle host directive inputs/outputs (#48147) |
| | update packages/language-service/build.sh script to work with vscode-ng-language-service's new Bazel build (#48120) |
router
| Commit | Description |
| -- | -- |
| | correct type of nextState parameter in canDeactivate (#48038) |
| | Ensure renavigating in component init works with enabledBlocking (#48063) |
| | restore 'history.state' on popstate even if navigationId missing (#48033) |
Special Thanks
Alan Agius, Andrew Scott, Bjarki, Bob Watson, Brooke, Derek Cormier, Dylan Hunn, George Kalpakas, Greg Magolan, Ikko Ashimine, Ivan Rodriguez, Jessica Janiuk, Joe Roxbury, Joey Perrott, Kristiyan Kostadinov, Matthieu Riegler, Mikhail Savchuk, Nebojsa Cvetkovic, Pawel Kozlowski, Volodymyr and Wooshaah
Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.
core
| Commit | Description |
| -- | -- |
| | hardening attribute and property binding rules for
Special Thanks
Andrew Kushnir, Joey Perrott and Paul Gschwendtner
Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.
core
| Commit | Description |
| -- | -- |
| | hardening attribute and property binding rules for
Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.
core
| Commit | Description |
| -- | -- |
| | hardening attribute and property binding rules for
Special Thanks
Andrew Kushnir, Andrew Scott, George Looshch, Joey Perrott and Paul Gschwendtner
Keyframes names are now prefixed with the component's "scope name".
For example, the following keyframes rule in a component definition,
whose "scope name" is host-my-cmp:
@keyframes foo { ... }
will become:
@keyframes host-my-cmp_foo { ... }
Any TypeScript/JavaScript code which relied on the names of keyframes rules
will no longer match.
The recommended solutions in this case are to either:
change the component's view encapsulation to the None or ShadowDom
define keyframes rules in global stylesheets (e.g styles.css)
define keyframes rules programmatically in code.
compiler-cli
Invalid constructors for DI may now report compilation errors
When a class inherits its constructor from a base class, the compiler may now
report an error when that constructor cannot be used for DI purposes. This may
either be because the base class is missing an Angular decorator such as
@Injectable() or @Directive(), or because the constructor contains parameters
which do not have an associated token (such as primitive types like string).
These situations used to behave unexpectedly at runtime, where the class may be
constructed without any of its constructor parameters, so this is now reported
as an error during compilation.
Any new errors that may be reported because of this change can be resolved either
by decorating the base class from which the constructor is inherited, or by adding
an explicit constructor to the class for which the error is reported.
Angular compiler option enableIvy has been removed as Ivy is the only rendering engine.
core
Angular no longer supports Node.js versions 14.[15-19].x and 16.[10-12].x. Current supported versions of Node.js are 14.20.x, 16.13.x and 18.10.x.
TypeScript versions older than 4.8 are no longer supported.
Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.
Existing iframe usages may have src or srcdoc preceding other attributes. Such usages may need to be updated to ensure compliance with the new stricter rules around iframe bindings.
forms
setDisabledState will always be called when a ControlValueAccessor is attached. You can opt-out with FormsModule.withConfig or ReactiveFormsModule.withConfig.
localize
canParse method has been removed from all translation parsers in @angular/localize/tools. analyze should be used instead.
the hint parameter in theparse methods is now mandatory.
router
Previously, the RouterOutlet would immediately
instantiate the component being activated during navigation. Now the
component is not instantiated until the change detection runs. This
could affect tests which do not trigger change detection after a router
navigation. In rarer cases, this can affect production code that relies
on the exact timing of component availability.
The title property is now required on ActivatedRouteSnapshot
relativeLinkResolution is no longer configurable in
the Router. This option was used as a means to opt out of a bug fix.
Deprecations
common
The DATE_PIPE_DEFAULT_TIMEZONE token is now deprecated in favor
of the DATE_PIPE_DEFAULT_OPTIONS token, which accepts an object
as a value and the timezone can be defined as a field (called timezone)
on that object.
core
The ability to pass an NgModule to the providedIn option for
@Injectable and InjectionToken is now deprecated.
providedIn: NgModule was intended to be a tree-shakable alternative to
NgModule providers. It does not have wide usage, and in most cases is used
incorrectly, in circumstances where providedIn: 'root' should be
preferred. If providers should truly be scoped to a specific NgModule, use
NgModule.providers instead.
The ability to set providedIn: 'any' for an @Injectable or
InjectionToken is now deprecated.
providedIn: 'any' is an option with confusing semantics and is almost
never used apart from a handful of esoteric cases internal to the framework.
The bit field signature of Injector.get() has been deprecated, in favor of the new options object.
The bit field signature of TestBed.inject() has been deprecated, in favor of the new options object.
router
The RouterLinkWithHref directive is deprecated, use the RouterLink directive instead. The RouterLink contains the code from the RouterLinkWithHref to handle elements with href attributes.
common
| Commit | Description |
| -- | -- |
| | add provideLocationMocks() function to provide Location mocks (#47674) |
| | add preload tag on server for priority img (#47343) |
| | Add automatic srcset generation to ngOptimizedImage (#47547) |
| | Add fill mode to NgOptimizedImage (#47738) |
| | add injection token for default DatePipe configuration (#47157) |
| | Add fetchpriority to ngOptimizedImage preloads (#48010) |
| | don't generate srcset if noopImageLoader is used (#47804) |
| | Don't warn about image distortion is fill mode is enabled (#47824) |
| | export the IMAGE_CONFIG token (#48051) |
| | fix formatting on oversized image error (#47188) |
| | rename rawSrc -> ngSrc in NgOptimizedImage directive (#47362) |
| | support density descriptors with 2+ decimals (#47197) |
| | update size error to mention 'fill' mode (#47797) |
| | warn if using supported CDN but not built-in loader (#47330) |
| | Warn on fill ngOptimizedImage without height (#48036) |
| Commit | Description |
| -- | -- |
| | deprecate providedIn: NgModule and providedIn: 'any' (#47616) |
| | add support for Node.js version 18 (#47730) |
| | drop support for TypeScript 4.6 and 4.7 (#47690) |
| | enable the new directive composition API (#47642) |
| | introduce EnvironmentProviders wrapper type (#47669) |
| | support object-based DI flags in Injector.get() (#46761) |
| | support object-based DI flags in TestBed.inject() (#46761) |
| | allow readonly arrays for standalone imports (#47851) |
| | hardening attribute and property binding rules for
forms
| Commit | Description |
| -- | -- |
| | export forms utility functions: isFormArray, isFormGroup… (#47718) |
| | call setDisabledState on ControlValueAcessor when control is enabled (#47576) |
| | don't mutate validators array (#47830) |
| | Improve a very commonly viewed error message by adding a guide. (#47969) |
| | Runtime error pages must begin with leading zero (#47991) |
http
| Commit | Description |
| -- | -- |
| | allow for child HttpClients to request via parents (#47502) |
| | introduce provideHttpClientTesting provider function (#47502) |
| | introduce functional interceptors (#47502) |
| | introduce the provideHttpClient() API (#47502) |
| | better handle unexpected undefined XSRF tokens (#47683) |
| | rename withLegacyInterceptors to withInterceptorsFromDi (#47901) |
language-service
| Commit | Description |
| -- | -- |
| | Quick fix to import a component when its selector is used (#47088) |
| | support to fix invalid banana in box (#47393) |
localize
| Commit | Description |
| -- | -- |
| | add polyfill in polyfills array instead of polyfills.ts (#47569) |
| | update ng add schematic to support Angular CLI version 15 (#47763) |
| | remove deprecated canParse method from TranslationParsers (#47275) |
platform-server
| Commit | Description |
| -- | -- |
| | align server renderer interface with base renderer (#47868) |
router
| Commit | Description |
| -- | -- |
| | add a migration to remove relativeLinkResolution usages (#47604) |
| | Add UrlTree constructor to public API (#47186) |
| | auto-unwrap default exports when lazy loading (#47586) |
| | make RouterOutlet name an Input so it can be set dynamically (#46569) |
| | merge RouterLinkWithHref into RouterLink (#47630) |
| | migrate RouterLinkWithHref references to RouterLink (#47599) |
| | prevent provideRouter() from usage in @Component (#47669) |
| | Delay router scroll event until navigated components have rendered (#47563) |
| | Ensure ActivatedRouteSnapshot#title has correct value (#47481) |
| | Remove deprecated relativeLinkResolution (#47623) |
Special Thanks
Alan Agius, AleksanderBodurri, Alex Castle, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Charles Lyding, Dylan Hunn, Ferdinand Malcher, George Kalpakas, Jeremy Elbourn, Jessica Janiuk, JiaLiPassion, Joey Perrott, JoostK, Kara Erickson, Kristiyan Kostadinov, Martin Probst, Matthias Weiß, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Sabareesh Kappagantu, WD Snoeijer, angular-robot[bot], arturovt, ced, dario-piotrowicz, ivanwonder and jaybell
Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.
core
| Commit | Description |
| -- | -- |
| | addzone.js version 0.12.x as a valid peer dependency (#48002) |
| | hardening attribute and property binding rules for
forms
| Commit | Description |
| -- | -- |
| | Improve a very commonly viewed error message by adding a guide. (#47969) |
| | Runtime error pages must begin with leading zero (#47991) |
Alan Agius, Albert Szekely, Alex Castle, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Doug Parker, Dylan Hunn, Kristiyan Kostadinov, Markus Eckstein, Matthieu Riegler, Paul Gschwendtner, Peter Scriven and abergquist
Existing iframe usages may have src or srcdoc preceding other attributes. Such usages may need to be updated to ensure compliance with the new stricter rules around iframe bindings.
core
| Commit | Description |
| -- | -- |
| | allow readonly arrays for standalone imports (#47851) |
| | hardening rules related to the attribute order on iframe elements (#47935) |
platform-browser
| Commit | Description |
| -- | -- |
| | resolve memory leak when using animations with shadow DOM (#47903) |
platform-server
| Commit | Description |
| -- | -- |
| | call onSerialize when state is empty (#47888) |
Special Thanks
Alan Agius, Alex Rickabaugh, Andrew Kushnir, Charles Lyding, Kristiyan Kostadinov, Paul Gschwendtner, Pawel Kozlowski, Virginia Dooley and mgechev
| Commit | Description |
| -- | -- |
| | align server renderer interface with base renderer (#47868) |
Special Thanks
Alan Agius, Alex Castle, Andrew Scott, Balaji, George Kalpakas, Kristiyan Kostadinov, Paul Gschwendtner, Pawel Kozlowski, WD Snoeijer, onrails and vyom1611
Alan Agius, Alex Castle, Andrew Kushnir, Andrew Scott, Bob Watson, Charles Barnes, Charles Lyding, Kara Erickson, Kristiyan Kostadinov, Paul Gschwendtner, Virginia Dooley, WD Snoeijer, abergquist and urugator
Invalid constructors for DI may now report compilation errors
When a class inherits its constructor from a base class, the compiler may now
report an error when that constructor cannot be used for DI purposes. This may
either be because the base class is missing an Angular decorator such as
@Injectable() or @Directive(), or because the constructor contains parameters
which do not have an associated token (such as primitive types like string).
These situations used to behave unexpectedly at runtime, where the class may be
constructed without any of its constructor parameters, so this is now reported
as an error during compilation.
Any new errors that may be reported because of this change can be resolved either
by decorating the base class from which the constructor is inherited, or by adding
an explicit constructor to the class for which the error is reported.
core
Angular no longer supports Node.js versions 14.[15-19].x and 16.[10-12].x. Current supported versions of Node.js are 14.20.x, 16.13.x and 18.10.x.
TypeScript versions older than 4.8 are no longer supported.
forms
setDisabledState will always be called when a ControlValueAccessor is attached. You can opt-out with FormsModule.withConfig or ReactiveFormsModule.withConfig.
router
relativeLinkResolution is no longer configurable in
the Router. This option was used as a means to opt out of a bug fix.
Deprecations
common
The DATE_PIPE_DEFAULT_TIMEZONE token is now deprecated in favor
of the DATE_PIPE_DEFAULT_OPTIONS token, which accepts an object
as a value and the timezone can be defined as a field (called timezone)
on that object.
router
The RouterLinkWithHref directive is deprecated, use the RouterLink directive instead. The RouterLink contains the code from the RouterLinkWithHref to handle elements with href attributes.
common
| Commit | Description |
| -- | -- |
| | add provideLocationMocks() function to provide Location mocks (#47674) |
| | add preload tag on server for priority img (#47343) |
| | Add automatic srcset generation to ngOptimizedImage (#47547) |
| | Add fill mode to NgOptimizedImage (#47738) |
| | add injection token for default DatePipe configuration (#47157) |
| Commit | Description |
| -- | -- |
| | add missing period to error message (#47744) |
| | exclude abstract classes from strictInjectionParameters requirement (#44615) |
| | use @ts-ignore. (#47636) |
| | minimize filesystem calls when generating shims (#47682) |
core
| Commit | Description |
| -- | -- |
| | add support for Node.js version 18 (#47730) |
| | drop support for TypeScript 4.6 and 4.7 (#47690) |
| | enable the new directive composition API (#47642) |
| | introduce EnvironmentProviders wrapper type (#47669) |
forms
| Commit | Description |
| -- | -- |
| | export forms utility functions: isFormArray, isFormGroup… (#47718) |
| | call setDisabledState on ControlValueAcessor when control is enabled (#47576) |
http
| Commit | Description |
| -- | -- |
| | allow for child HttpClients to request via parents (#47502) |
| | introduce provideHttpClientTesting provider function (#47502) |
| | introduce functional interceptors (#47502) |
| | introduce the provideHttpClient() API (#47502) |
| | better handle unexpected undefined XSRF tokens (#47683) |
language-service
| Commit | Description |
| -- | -- |
| | Quick fix to import a component when its selector is used (#47088) |
router
| Commit | Description |
| -- | -- |
| | add a migration to remove relativeLinkResolution usages (#47604) |
| | merge RouterLinkWithHref into RouterLink (#47630) |
| | migrate RouterLinkWithHref references to RouterLink (#47599) |
| | prevent provideRouter() from usage in @Component (#47669) |
| | Remove deprecated relativeLinkResolution (#47623) |
Special Thanks
Alan Agius, AleksanderBodurri, Alex Castle, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Aristeidis Bampakos, Bob Watson, Charles Lyding, Dylan Hunn, Ferdinand Malcher, George Kalpakas, Jessica Janiuk, Joey Perrott, JoostK, Joshua Morony, Kristiyan Kostadinov, Martin Probst, Mathew Berg, Matthias Weiß, Paul Gschwendtner, Peter Dickten, Renan Ferro, Sri Ram, WD Snoeijer, arturovt, jaybell, markostanimirovic and Álvaro Martínez
| Commit | Description |
| -- | -- |
| | add missing period to error message (#47744) |
| | minimize filesystem calls when generating shims (#47682) |
Special Thanks
Alan Agius, Andrew Kushnir, Andrew Scott, Aristeidis Bampakos, Bob Watson, Charles Lyding, Joey Perrott, Joshua Morony, Mathew Berg, Paul Gschwendtner, Peter Dickten, Renan Ferro, Sri Ram, WD Snoeijer, markostanimirovic and Álvaro Martínez
Keyframes names are now prefixed with the component's "scope name".
For example, the following keyframes rule in a component definition,
whose "scope name" is host-my-cmp:
@keyframes foo { ... }
will become:
@keyframes host-my-cmp_foo { ... }
Any TypeScript/JavaScript code which relied on the names of keyframes rules
will no longer match.
The recommended solutions in this case are to either:
change the component's view encapsulation to the None or ShadowDom
define keyframes rules in global stylesheets (e.g styles.css)
define keyframes rules programmatically in code.
router
Previously, the RouterOutlet would immediately
instantiate the component being activated during navigation. Now the
component is not instantiated until the change detection runs. This
could affect tests which do not trigger change detection after a router
navigation. In rarer cases, this can affect production code that relies
on the exact timing of component availability.
Deprecations
core
The ability to pass an NgModule to the providedIn option for
@Injectable and InjectionToken is now deprecated.
providedIn: NgModule was intended to be a tree-shakable alternative to
NgModule providers. It does not have wide usage, and in most cases is used
incorrectly, in circumstances where providedIn: 'root' should be
preferred. If providers should truly be scoped to a specific NgModule, use
NgModule.providers instead.
The ability to set providedIn: 'any' for an @Injectable or
InjectionToken is now deprecated.
providedIn: 'any' is an option with confusing semantics and is almost
never used apart from a handful of esoteric cases internal to the framework.
| Commit | Description |
| -- | -- |
| | auto-unwrap default exports when lazy loading (#47586) |
| | make RouterOutlet name an Input so it can be set dynamically (#46569) |
Special Thanks
Alan Agius, Alex Rickabaugh, Alexander Wiebe, Andrew Kushnir, Andrew Scott, Ciprian Sauliuc, Dmytro Mezhenskyi, Dylan Hunn, George Kalpakas, Joe Martin (Crowdstaffing), Jordan, Kristiyan Kostadinov, Martin Probst, Ole M, Paul Gschwendtner, Pawel Kozlowski, dario-piotrowicz and mgechev
Alexander Wiebe, Ciprian Sauliuc, Dmytro Mezhenskyi, George Kalpakas, Joe Martin (Crowdstaffing), Jordan, Ole M, Paul Gschwendtner, Pawel Kozlowski and mgechev
The title property is now required on ActivatedRouteSnapshot
Deprecations
core
The bit field signature of Injector.get() has been deprecated, in favor of the new options object.
The bit field signature of TestBed.inject() has been deprecated, in favor of the new options object.
core
| Commit | Description |
| -- | -- |
| | support object-based DI flags in Injector.get() (#46761) |
| | support object-based DI flags in TestBed.inject() (#46761) |
| | correctly check for typeof of undefined in ngDevMode check (#47480) |
| | update isDevMode to rely on ngDevMode (#47475) |
language-service
| Commit | Description |
| -- | -- |
| | support to fix invalid banana in box (#47393) |
router
| Commit | Description |
| -- | -- |
| | Ensure ActivatedRouteSnapshot#title has correct value (#47481) |
Special Thanks
Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Ashley Hunter, Doug Parker, Jessica Janiuk, JiaLiPassion, Kristiyan Kostadinov, Rokas Brazdžionis, Simona Cotin and ivanwonder
An open-source, self-hosted, low-code framework to build internal tools, web apps, admin panels, BI dashboards, workflows, and CRUD apps with YAML or JSON.