Repository navigation
v19.0.0-next.0
Pre-release
Pre-release
·
8151 commits
to main
since this release
19.0.0-next.0 (2024-08-14)
core
| Commit | Description |
|---|---|
| rethrow errors during ApplicationRef.tick in TestBed (#57200) |
router
| Commit | Description |
|---|---|
Add routerOutletData input to RouterOutlet directive (#57051) |
|
| Align RouterModule.forRoot errorHandler with provider error handler (#57050) | |
| Update Resolve interface to include RedirectCommand like ResolveFn (#57309) |
Breaking Changes
core
-
Errors that are thrown during
ApplicationRef.tick
will now be rethrown when usingTestBed. These errors should be
resolved by ensuring the test environment is set up correctly to
complete change detection successfully. There are two alternatives to
catch the errors:- Instead of waiting for automatic change detection to happen, trigger
it synchronously and expect the error. For example, a jasmine test
could writeexpect(() => TestBed.inject(ApplicationRef).tick()).toThrow() TestBedwill reject any outstandingComponentFixture.whenStablepromises. A jasmine test,
for example, could writeexpectAsync(fixture.whenStable()).toBeRejected().
As a last resort, you can configure errors to not be rethrown by
settingrethrowApplicationErrorstofalseinTestBed.configureTestingModule. - Instead of waiting for automatic change detection to happen, trigger
router
- The
Router.errorHandlerproperty has been removed.
Adding an error handler should be configured in either
withNavigationErrorHandlerwithprovideRouteror theerrorHandler
property in the extra options ofRouterModule.forRoot. In addition,
the error handler cannot be used to change the return value of the
router navigation promise or prevent it from rejecting. Instead, if you
want to prevent the promise from rejecting, useresolveNavigationPromiseOnError. - The return type of the
Resolveinterface now includes
RedirectCommand.