yarn @angular/common 19.0.0-next.0
v19.0.0-next.0

latest releases: 19.0.0-next.6, 18.2.5, 19.0.0-next.5...
one month ago

19.0.0-next.0 (2024-08-14)

core

Commit Description
fix - 468d3fb9b1 rethrow errors during ApplicationRef.tick in TestBed (#57200)

router

Commit Description
feat - f271021e19 Add routerOutletData input to RouterOutlet directive (#57051)
fix - b2790813a6 Align RouterModule.forRoot errorHandler with provider error handler (#57050)
fix - 7436d3180e Update Resolve interface to include RedirectCommand like ResolveFn (#57309)

Breaking Changes

core

  • Errors that are thrown during ApplicationRef.tick
    will now be rethrown when using TestBed. 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 write expect(() => TestBed.inject(ApplicationRef).tick()).toThrow()
    • TestBed will reject any outstanding ComponentFixture.whenStable promises. A jasmine test,
      for example, could write expectAsync(fixture.whenStable()).toBeRejected().

    As a last resort, you can configure errors to not be rethrown by
    setting rethrowApplicationErrors to false in TestBed.configureTestingModule.

router

  • The Router.errorHandler property has been removed.
    Adding an error handler should be configured in either
    withNavigationErrorHandler with provideRouter or the errorHandler
    property in the extra options of RouterModule.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, use resolveNavigationPromiseOnError.
  • The return type of the Resolve interface now includes
    RedirectCommand.

Don't miss a new common release

NewReleases is sending notifications on new releases.