Angular 16

https://github.com/angular/angular

16.2.0-next.1 (2023-06-28)

benchpress

Commit Description
fix - dd850b2ab7 correctly report GC memory amounts (#50760)

core

Commit Description
fix - 29340a0678 expose input transform function on ComponentFactory and ComponentMirror (#50713)

elements

Commit Description
fix - d64864e95e support input transform functions (#50713)

platform-browser

Commit Description
fix - 2b55103e94 wait until animation completion before destroying renderer (#50677)
fix - 0380564f85 wait until animation completion before destroying renderer (#50860)

16.1.3 (2023-06-28)

core

Commit Description
fix - dd6fc5785f expose input transform function on ComponentFactory and ComponentMirror (#50713)

elements

Commit Description
fix - e1bbe47c23 support input transform functions (#50713)

platform-browser

Commit Description
fix - 79dd6a847a wait until animation completion before destroying renderer (#50677)
fix - a797f41d1b wait until animation completion before destroying renderer (#50860)

16.2.0-next.0 (2023-06-21)

compiler-cli

Commit Description
fix - 12bad6576d libraries compiled with v16.1+ breaking with Angular framework v16.0.x (#50714)

router

Commit Description
feat - 0b14e4ef74 exposes the fixture of the RouterTestingHarness (#50280)

16.1.2 (2023-06-21)

http

Commit Description
fix - 9488a3fd46 Send query params on fetch request (#50740)
fix - 5ae001829c use serializeBody to support JSON payload in FetchBackend (#50776)

16.1.1 (2023-06-14)

compiler-cli

Commit Description
fix - 71360b3a3e libraries compiled with v16.1+ breaking with Angular framework v16.0.x (#50715)

core

Commit Description
fix - d9bed48eb5 extend toSignal to accept any Subscribable (#50162)

migrations

Commit Description
fix - 5e1d8444ae Prevent a component from importing itself. (#50554)

16.1.0 (2023-06-13)

compiler

Commit Description
fix - 4e663297c5 error when reading compiled input transforms metadata in JIT mode (#50600)
fix - 721bc72649 resolve deprecation warning with TypeScript 5.1 (#50460)

core

Commit Description
feat - 68017d4e75 add ability to transform input values (#50420)
feat - 69dadd2502 support TypeScript 5.1 (#50156)
fix - c0ebe34cbd add additional component metadata to component ID generation (#50336)

http

Commit Description
feat - 85c5427582 Introduction of the fetch Backend for the HttpClient (#50247)

16.0.6 (2023-06-13)

core

Commit Description
fix - 05ac0868c9 avoid duplicated content during hydration while processing a component with i18n (#50644)

16.1.0-rc.0 (2023-06-08)

compiler

Commit Description
fix - 540e643347 do not remove comments in component styles (#50346)
fix - 4e663297c5 error when reading compiled input transforms metadata in JIT mode (#50600)

core

Commit Description
fix - 79a706c847 incorrectly throwing error for self-referencing component (#50559)
fix - edceb486dd wait for HTTP in ngOnInit correctly before server render (#50573)

http

Commit Description
feat - 85c5427582 Introduction of the fetch Backend for the HttpClient (#50247)

platform-server

Commit Description
fix - 0875b519b9 surface errors during rendering (#50587)

16.0.5 (2023-06-08)

compiler

Commit Description
fix - 703b8fcac1 do not remove comments in component styles (#50346)

core

Commit Description
fix - 2b6da93e19 incorrectly throwing error for self-referencing component (#50559)
fix - c992109d6c wait for HTTP in ngOnInit correctly before server render (#50573)

platform-server

Commit Description
fix - c0d4086c6e surface errors during rendering (#50587)

16.1.0-next.3 (2023-06-01)

animations

Commit Description
fix - bada9199f5 Trigger leave animation when ViewContainerRef is injected (#48705)

common

Commit Description
fix - 72b4ff4b9e untrack subscription and unsubscription in async pipe (#50522)

compiler

Commit Description
fix - 721bc72649 resolve deprecation warning with TypeScript 5.1 (#50460)

core

Commit Description
feat - 68017d4e75 add ability to transform input values (#50420)
fix - 28c68f709c update ApplicationRef.isStable to account for rendering pending tasks (#50425)

16.0.4 (2023-06-01)

animations

Commit Description
fix - df65c4fc8f Trigger leave animation when ViewContainerRef is injected (#48705)

common

Commit Description
fix - 7e1bc513de untrack subscription and unsubscription in async pipe (#50522)

core

Commit Description
fix - 9970b29ace update ApplicationRef.isStable to account for rendering pending tasks (#50425)

16.1.0-next.2 (2023-05-24)

core

Commit Description
fix - 75fdbcb8f2 fix Self flag inside embedded views with custom injectors (#50270)
fix - 8b44ba3170 host directives incorrectly validating aliased bindings (#50364)

http

Commit Description
fix - 2cdb4c5911 create macrotask during request handling instead of load start (#50406)

16.0.3 (2023-05-24)

core

Commit Description
fix - c11041e372 adds missing symbols for animation standalone bundling test (#50434)
fix - 98e8fdf40e fix Self flag inside embedded views with custom injectors (#50270)
fix - 199ff4fe7f host directives incorrectly validating aliased bindings (#50364)

http

Commit Description
fix - 080bbd2137 create macrotask during request handling instead of load start (#50406)

16.1.0-next.1 (2023-05-17)

core

Commit Description
fix - c0ebe34cbd add additional component metadata to component ID generation (#50336)
fix - 03f1e240b3 allow onDestroy unregistration while destroying (#50237)
fix - 165b8b647c allow passing value of any type to isSignal function (#50035)

16.0.2 (2023-05-17)

core

Commit Description
fix - c1016d4e57 add additional component metadata to component ID generation (#50340)
fix - cc41758b59 allow onDestroy unregistration while destroying (#50237)
fix - 7d679bdb59 allow passing value of any type to isSignal function (#50035)

16.1.0-next.0 (2023-05-10)

core

Commit Description
feat - 69dadd2502 support TypeScript 5.1 (#50156)

16.0.1 (2023-05-10)

core

Commit Description
fix - 52c74d3b4a add additional component metadata to component ID generation (#50203)
fix - 048b6b1e0d bootstrapApplication call not rejected when error is thrown in importProvidersFrom module (#50120)
fix - d68796782f handle hydration of root components with injected ViewContainerRef (#50136)
fix - f751ce6445 handle projection of hydrated containters into components that skip hydration (#50199)
fix - 346ab73dd9 only try to retrieve transferred state on the browser (#50144)

16.0.0 (2023-05-03)

Commit Description
refactor - 48aa96ea13 remove Angular Compatibility Compiler (ngcc) (#49101)
refactor - 2703fd6260 remove deprecated EventManager method addGlobalEventListener (#49645)

common

Commit Description
feat - 5dce2a5a3a Provide MockPlatformLocation by default in BrowserTestingModule (#49137)
fix - d47fef72cb strict type checking for ngtemplateoutlet (#48374)
refactor - c41a21658c remove deprecated XhrFactory export from http entrypoint (#49251)

compiler

Commit Description
feat - 1a6ca68154 add support for compile-time required inputs (#49304)
feat - 13dd614cd1 add support for compile-time required inputs (#49453)
feat - 8f539c11f4 add support for compile-time required inputs (#49468)
feat - 79cdfeb392 drop support for TypeScript 4.8 (#49155)
feat - 1407a9aeaf support multiple configuration files in extends (#49125)
fix - 9de1e9da8f incorrectly matching directives on attribute bindings (#49713)
fix - 6623810e4d Produce diagnositc if directive used in host binding is not exported (#49527)

compiler-cli

Commit Description
feat - 03d1d00ad9 Add an extended diagnostic for nSkipHydration (#49512)
fix - ed817e32fe Catch FatalDiagnosticError during template type checking (#49527)
perf - 49fe974501 optimize NgModule emit for standalone components (#49837)

core

Commit Description
feat - 89d291c367 add assertInInjectionContext (#49529)
feat - 4e9531f777 add mergeApplicationConfig method (#49253)
feat - d7d6514add Add ability to configure NgZone in bootstrapApplication (#49557)
feat - bc5ddabdcb add Angular Signals to the public API (#49150)
feat - 17e9862653 add API to provide CSP nonce for inline stylesheets (#49444)
feat - 605c536420 add migration to remove moduleId references (#49496)
feat - 99d874fe3b add support for TypeScript 5.0 (#49126)
feat - d1617c449d allow removal of previously registered DestroyRef callbacks (#49493)
feat - b2327f4df1 Allow typeguards on QueryList.filter (#48042)
feat - 061f3d1086 Drop public factories property for IterableDiffers : Breaking change (#49598)
feat - fdf61974d1 drop support for zone.js versions <=0.12.0 (#49331)
feat - 9c5fd50de4 effects can optionally return a cleanup function (#49625)
feat - c024574f46 expose makeStateKey, StateKey and TransferState (#49563)
feat - a5f1737d1c expose onDestroy on ApplicationRef (#49677)
feat - e883198460 implement takeUntilDestroyed in rxjs-interop (#49154)
feat - 0814f20594 introduce runInInjectionContext and deprecate prior version (#49396)
feat - 0f5c8003cc introduce concept of DestroyRef (#49158)
feat - 9b65b84cb9 Mark components for check if they read a signal (#49153)
feat - 8997bdc03b prototype implementation of @angular/core/rxjs-interop (#49154)
feat - 585e34bf6c remove entryComponents (#49484)
feat - aad05ebeb4 support usage of non-experimental decorators with TypeScript 5.0 (#49492)
fix - 6d7be42da7 add newline to hydration mismatch error (#49965)
fix - f8e25864e8 allow async functions in effects (#49783)
fix - 84216dabfc catch errors from source signals outside of .next (#49769)
fix - be23b7ce65 ComponentRef.setInput only sets input when not equal to previous (#49607)
fix - 316c91b1a4 deprecate moduleId @Component property (#49496)
fix - fd9dcd36cd Ensure effects can be created when Zone is not defined (#49890)
fix - 9180f98f0e ensure takeUntilDestroyed unregisters onDestroy listener on unsubscribe (#49901)
fix - 4721c48a24 error if document body is null (#49818)
fix - 2650f1afc1 execute input setters in non-reactive context (#49906)
fix - f8b95b9da6 execute query setters in non-reactive context (#49906)
fix - ef91a2e0fe execute template creation in non-reactive context (#49883)
fix - 87549af73c Fix capitalization of toObservableOptions (#49832)
fix - 0e5f9ba6f4 generate consistent component IDs (#48253)
fix - fedc75624c include inner ViewContainerRef anchor nodes into ViewRef.rootNodes output (#49867)
fix - df1dfc4c17 make sure that lifecycle hooks are not tracked (#49701)
fix - c34d7e0822 onDestroy should be registered only on valid DestroyRef (#49804)
fix - 2f2ef14f9e resolve InitialRenderPendingTasks promise on complete (#49784)
fix - c7d8d3ee37 toObservable should allow writes to signals in the effect (#49769)
fix - b4531f1d82 typing of TestBed Common token. (#49997)
fix - a4e749ffca When using setInput, mark view dirty in same was as markForCheck (#49711)
perf - 9b9c818f99 change RendererType2.styles to accept a only a flat array (#49072)
refactor - 82d6fbb109 generate a static application ID (#49422)
refactor - 3b863ddc1e Remove ReflectiveInjector symbol (#48103)
refactor - f594725951 remove Node.js v14 support (#49255)

forms

Commit Description
feat - 07a1aa3004 Improve typings form (async)Validators (#48679)

http

Commit Description
feat - aff1512950 allow HttpClient to cache requests (#49509)
fix - 15c91a53ae delay accessing pendingTasks.whenAllTasksComplete (#49784)
fix - 9f0c6d1ed1 ensure new cache state is returned on each request (#49749)
fix - 45a6ac09fd force macro task creation during HTTP request (#49546)
fix - 2a580b6f0b HTTP cache was being disabled prematurely (#49826)
fix - 2eb9b8b402 wait for all XHR requests to finish before stabilizing application (#49776)

migrations

Commit Description
feat - 5e5dac278d Migration to remove Router guard and resolver interfaces (#49337)

platform-browser

Commit Description
feat - 761e02d912 add a public API function to enable non-destructive hydration (#49666)
feat - 630af63fae deprecate withServerTransition call (#49422)
feat - 81e7d15ef6 enable HTTP request caching when using provideClientHydration (#49699)
fix - 74c925c19c export deprecated TransferState as type (#50015)
fix - 2312eb53ef KeyEventsPlugin should keep the same behavior (#49330)
fix - c934a8e72b only add ng-app-id to style on server side (#49465)
fix - 9165ff2517 reuse server generated component styles (#48253)
fix - e8e36811d5 set nonce attribute in a platform compatible way (#49624)
refactor - 3aa85a8087 move ApplicationConfig to core (#49253)
refactor - 9bd9a11f4e remove deprecated BrowserTransferStateModule symbol (#49718)

platform-server

Commit Description
feat - b5278cc115 renderApplication now accepts a bootstrapping method (#49248)
feat - 056d68002f add provideServerSupport function to provide server capabilities to an application (#49380)
feat - 7870fb07fe rename provideServerSupport to provideServerRendering (#49678)
fix - a08a8ff108 bundle @angular/domino in via esbuild (#49229)
fix - 5ea624f313 remove dependency on @angular/platform-browser-dynamic (#50064)
refactor - e99460865e deprecate useAbsoluteUrl and baseUrl (#49546)
refactor - 41f27ad086 remove renderApplication overload that accepts a component (#49463)
refactor - 17abe6dc96 remove deprecated renderModuleFactory (#49247)

router

Commit Description
feat - ea32c3289a Expose information about the last successful Navigation (#49235)
feat - 455c728525 helper functions to convert class guards to functional (#48709)
feat - f982a3f965 Opt-in for binding Router information to component inputs (#49633)
fix - 1f055b90b6 Ensure anchor scrolling happens on ignored same URL navigations (#48025)
fix - 6193a3d406 fix = not parsed in router segment name (#47332)
fix - c0b1b7becf Remove deprecated ComponentFactoryResolver from APIs (#49239)
fix - 1e32709e0e remove RouterEvent from Event union type (#46061)
fix - 3c7e637374 Route matching should only happen once when navigating (#49163)
fix - 1600687fe5 Route matching should only happen once when navigating (#49163)
fix - 31f210bf2c Router.createUrlTree should work with any ActivatedRoute (#48508)

service-worker

Commit Description
feat - 5e7fc259ea add function to provide service worker (#48247)

Breaking Changes

  • Angular Compatibility Compiler (ngcc) has been removed and as a result Angular View Engine libraries will no longer work
  • Deprecated EventManager method addGlobalEventListener has been removed as it is not used by Ivy.

bazel

  • Several changes to the Angular Package Format (APF)
    • Removal of FESM2015
    • Replacing ES2020 with ES2022
    • Replacing FESM2020 with FESM2022
  • Several changes to the Angular Package Format (APF)
    • Removal of FESM2015
    • Replacing ES2020 with ES2022
    • Replacing FESM2020 with FESM2022

common

  • MockPlatformLocation is now provided by default in tests.
    Existing tests may have behaviors which rely on
    BrowserPlatformLocation instead. For example, direct access to the
    window.history in either the test or the component rather than going
    through the Angular APIs (Location.getState()). The quickest fix is to
    update the providers in the test suite to override the provider again
    TestBed.configureTestingModule({providers: [{provide: PlatformLocation, useClass: BrowserPlatformLocation}]}).
    The ideal fix would be to update the code to instead be compatible with
    MockPlatformLocation instead.
  • If the 'ngTemplateOutletContext' is different from the context, it will result in a compile-time error.

Before the change, the following template was compiling:

interface MyContext {
  $implicit: string;
}

@Component({
  standalone: true,
  imports: [NgTemplateOutlet],
  selector: 'person',
  template: `
    <ng-container
      *ngTemplateOutlet="
        myTemplateRef;
        context: { $implicit: 'test', xxx: 'xxx' }
      "></ng-container>
  `,
})
export class PersonComponent {
  myTemplateRef!: TemplateRef<MyContext>;
}

However, it does not compile now because the 'xxx' property does not exist in 'MyContext', resulting in the error: 'Type '{ $implicit: string; xxx: string; }' is not assignable to type 'MyContext'.'

The solution is either:

  • add the 'xxx' property to 'MyContext' with the correct type or
  • add '$any(...)' inside the template to make the error disappear. However, adding '$any(...)' does not correct the error but only preserves the previous behavior of the code.
  • Deprecated XhrFactory export from @angular/common/http has been removed. Use XhrFactory from @angular/common instead.

compiler

    • TypeScript 4.8 is no longer supported.

core

  • QueryList.filter now supports type guard functions, which will result in type narrowing. Previously if you used type guard functions, it resulted in no changes to the return type. Now the type would be narrowed, which might require updates to the application code that relied on the old behavior.

  • zone.js versions 0.11.x and 0.12.x are not longer supported.

    • entryComponents has been deleted from the @NgModule and @Component public APIs. Any usages can be removed since they weren't doing anyting.
    • ANALYZE_FOR_ENTRY_COMPONENTS injection token has been deleted. Any references can be removed.
  • ComponentRef.setInput will only set the input on the
    component if it is different from the previous value (based on Object.is
    equality). If code relies on the input always being set, it should be
    updated to copy objects or wrap primitives in order to ensure the input
    value differs from the previous call to setInput.

  • RendererType2.styles no longer accepts a nested arrays.

  • The APP_ID token value is no longer randomly generated. If you are bootstrapping multiple application on the same page you will need to set to provide the APP_ID yourself.

    bootstrapApplication(ComponentA, {
      providers: [
       { provide: APP_ID, useValue: 'app-a' },
       // ... other providers ...
      ]
    });
    
  • The ReflectiveInjector and related symbols were removed. Please update the code to avoid references to the ReflectiveInjector symbol. Use Injector.create as a replacement to create an injector instead.

  • Node.js v14 support has been removed

    Node.js v14 is planned to be End-of-Life on 2023-04-30. Angular will stop supporting Node.js v14 in Angular v16. Angular v16 will continue to officially support Node.js versions v16 and v18.

platform-browser

  • The deprecated BrowserTransferStateModule was removed, since it's no longer needed. The TransferState class can be injected without providing the module. The BrowserTransferStateModule was empty starting from v14 and you can just remove the reference to that module from your applications.

platform-server

  • Users that are using SSR with JIT mode will now need to add import to @angular/compiler before bootstrapping the application.

    NOTE: this does not effect users using the Angular CLI.

  • renderApplication method no longer accepts a root component as first argument. Instead, provide a bootstrapping function that returns a Promise<ApplicationRef>.

    Before

    const output: string = await renderApplication(RootComponent, options);
    

    Now

    const bootstrap = () => bootstrapApplication(RootComponent, appConfig);
    const output: string = await renderApplication(bootstrap, options);
    
  • renderModuleFactory has been removed. Use renderModule instead.

router

  • The Scroll event's routerEvent property may also be
    a NavigationSkipped event. Previously, it was only a NavigationEnd
    event.
  • ComponentFactoryResolver has been removed from Router APIs.
    Component factories are not required to create an instance of a component
    dynamically. Passing a factory resolver via resolver argument is no longer needed
    and code can instead use ViewContainerRef.createComponent without the
    factory resolver.
  • The RouterEvent type is no longer present in the Event union type representing all router event types. If you have code using something like filter((e: Event): e is RouterEvent => e instanceof RouterEvent), you'll need to update it to filter((e: Event|RouterEvent): e is RouterEvent => e instanceof RouterEvent).
  • Tests which mock ActivatedRoute instances may need to be adjusted
    because Router.createUrlTree now does the right thing in more
    scenarios. This means that tests with invalid/incomplete ActivatedRoute mocks
    may behave differently than before. Additionally, tests may now navigate
    to a real URL where before they would navigate to the root. Ensure that
    tests provide expected routes to match.
    There is rarely production impact, but it has been found that relative
    navigations when using an ActivatedRoute that does not appear in the
    current router state were effectively ignored in the past. By creating
    the correct URLs, this sometimes resulted in different navigation
    behavior in the application. Most often, this happens when attempting to
    create a navigation that only updates query params using an empty
    command array, for example router.navigate([], {relativeTo: route, queryParams: newQueryParams}). In this case, the relativeTo property
    should be removed.

Deprecations

core

  • makeStateKey, StateKey and TransferState exports have been moved from @angular/platform-browser to @angular/core. Please update the imports.
- import {makeStateKey, StateKey, TransferState} from '@angular/platform-browser';
+ import {makeStateKey, StateKey, TransferState} from '@angular/core';
  • EnvironmentInjector.runInContext is now deprecated, with
    runInInjectionContext functioning as a direct replacement:

    // Previous method version (deprecated):
    envInjector.runInContext(fn);
    // New standalone function:
    runInInjectionContext(envInjector, fn);
    
  • The @Directive/@Component moduleId property is now
    deprecated. It did not have any effect for multiple major versions and
    will be removed in v17.

platform-browser

  • BrowserModule.withServerTransition has been deprecated. APP_ID should be used instead to set the application ID.
    NB: Unless, you render multiple Angular applications on the same page, setting an application ID is not necessary.

    Before:

    imports: [
      BrowserModule.withServerTransition({ appId: 'serverApp' }),
      ...
    ]
    

    After:

    imports: [
      BrowserModule,
      { provide: APP_ID, useValue: 'serverApp' },
      ...
    ],
    
  • ApplicationConfig has moved, please import ApplicationConfig from @angular/core instead.

platform-server

  • PlatformConfig.baseUrl and PlatformConfig.useAbsoluteUrl platform-server config options are deprecated as these were not used.

16.0.0-rc.4 (2023-05-01)

common

Commit Description
fix - 80ed0a4868 fix incorrectly reported distortion for padded images (#49889)

compiler-cli

Commit Description
fix - 6da1054a42 catch fatal diagnostic when getting diagnostics for components (#50046)

platform-server

Commit Description
fix - 5ea624f313 remove dependency on @angular/platform-browser-dynamic (#50064)

Breaking Changes

platform-server

  • Users that are using SSR with JIT mode will now need to add import to @angular/compiler before bootstrapping the application.

    NOTE: this does not effect users using the Angular CLI.

16.0.0-rc.3 (2023-04-27)

core

Commit Description
fix - 6d7be42da7 add newline to hydration mismatch error (#49965)
fix - 9180f98f0e ensure takeUntilDestroyed unregisters onDestroy listener on unsubscribe (#49901)
fix - b4531f1d82 typing of TestBed Common token. (#49997)

platform-browser

Commit Description
fix - 74c925c19c export deprecated TransferState as type (#50015)

16.0.0-rc.2 (2023-04-19)

compiler-cli

Commit Description
perf - 49fe974501 optimize NgModule emit for standalone components (#49837)

core

Commit Description
fix - fd9dcd36cd Ensure effects can be created when Zone is not defined (#49890)
fix - 2650f1afc1 execute input setters in non-reactive context (#49906)
fix - f8b95b9da6 execute query setters in non-reactive context (#49906)
fix - ef91a2e0fe execute template creation in non-reactive context (#49883)
fix - a3c3ab757c handle invalid classes in class array bindings (#49924)
fix - fedc75624c include inner ViewContainerRef anchor nodes into ViewRef.rootNodes output (#49867)

router

Commit Description
fix - 98223c11ca canceledNavigationResolution: 'computed' with redirects to the current URL (#49793)

16.0.0-rc.1 (2023-04-14)

core

Commit Description
fix - 4721c48a24 error if document body is null (#49818)
fix - 87549af73c Fix capitalization of toObservableOptions (#49832)
fix - c34d7e0822 onDestroy should be registered only on valid DestroyRef (#49804)

http

Commit Description
fix - 2a580b6f0b HTTP cache was being disabled prematurely (#49826)
fix - 95bc7e2c03 prevent headers from throwing an error when initializing numerical values (#49379)

Special Thanks

Alan Agius, Andrew Kushnir, Andrew Scott, Danilo Bassi, Kristiyan Kostadinov, Matthieu Riegler, Pawel Kozlowski and Payam Valadkhan

16.0.0-rc.0 (2023-04-12)

compiler

Commit Description
fix - 9de1e9da8f incorrectly matching directives on attribute bindings (#49713)
fix - 6623810e4d Produce diagnositc if directive used in host binding is not exported (#49527)

compiler-cli

Commit Description
fix - ed817e32fe Catch FatalDiagnosticError during template type checking (#49527)

core

Commit Description
fix - f8e25864e8 allow async functions in effects (#49783)
fix - 84216dabfc catch errors from source signals outside of .next (#49769)
fix - 2f2ef14f9e resolve InitialRenderPendingTasks promise on complete (#49784)
fix - c7d8d3ee37 toObservable should allow writes to signals in the effect (#49769)

http

Commit Description
fix - 15c91a53ae delay accessing pendingTasks.whenAllTasksComplete (#49784)
fix - 9f0c6d1ed1 ensure new cache state is returned on each request (#49749)
fix - 2eb9b8b402 wait for all XHR requests to finish before stabilizing application (#49776)

router

Commit Description
fix - 6193a3d406 fix = not parsed in router segment name (#47332)

Special Thanks

Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Brandon Roberts, De Wildt, Jessica Janiuk, Joey Perrott, Kristiyan Kostadinov, Matthieu Riegler, Nikola Kološnjaji, Paul Gschwendtner, Pawel Kozlowski and dewildt

16.0.0-next.7 (2023-04-05)

Breaking Changes

core

  • QueryList.filter now supports type guard functions, which will result in type narrowing. Previously if you used type guard functions, it resulted in no changes to the return type. Now the type would be narrowed, which might require updates to the application code that relied on the old behavior.
  • The ReflectiveInjector and related symbols were removed. Please update the code to avoid references to the ReflectiveInjector symbol. Use Injector.create as a replacement to create an injector instead.

platform-browser

  • The deprecated BrowserTransferStateModule was removed, since it's no longer needed. The TransferState class can be injected without providing the module. The BrowserTransferStateModule was empty starting from v14 and you can just remove the reference to that module from your applications.

core

Commit Description
feat - b2327f4df1 Allow typeguards on QueryList.filter (#48042)
feat - b35fa73968 change the URL sanitization to only block javascript: URLs (#49659)
feat - 061f3d1086 Drop public factories property for IterableDiffers : Breaking change (#49598)
feat - a5f1737d1c expose onDestroy on ApplicationRef (#49677)
feat - aad05ebeb4 support usage of non-experimental decorators with TypeScript 5.0 (#49492)
fix - df1dfc4c17 make sure that lifecycle hooks are not tracked (#49701)
fix - a4e749ffca When using setInput, mark view dirty in same was as markForCheck (#49711)
refactor - 3b863ddc1e Remove ReflectiveInjector symbol (#48103)

http

Commit Description
feat - aff1512950 allow HttpClient to cache requests (#49509)

platform-browser

Commit Description
feat - 761e02d912 add a public API function to enable non-destructive hydration (#49666)
feat - 81e7d15ef6 enable HTTP request caching when using provideClientHydration (#49699)
refactor - 9bd9a11f4e remove deprecated BrowserTransferStateModule symbol (#49718)

platform-server

Commit Description
feat - 7870fb07fe rename provideServerSupport to provideServerRendering (#49678)

router

Commit Description
fix - b203e4c19d create correct URL relative to path with empty child (#49691)

Special Thanks

Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Charles Lyding, Dylan Hunn, Guillaume Weghsteen, Jessica Janiuk, JoostK, Matthieu Riegler, Pawel Kozlowski, Robin Richtsfeld, Sandra Limacher and vikram menon

16.0.0-next.6 (2023-04-03)

Breaking Changes

  • Deprecated EventManager method addGlobalEventListener has been removed as it is not used by Ivy.

Commit Description
refactor - 2703fd6260 remove deprecated EventManager method addGlobalEventListener (#49645)

core

Commit Description
feat - d7d6514add Add ability to configure NgZone in bootstrapApplication (#49557)
feat - e883198460 implement takeUntilDestroyed in rxjs-interop (#49154)
feat - 8997bdc03b prototype implementation of @angular/core/rxjs-interop (#49154)

forms

Commit Description
feat - 07a1aa3004 Improve typings form (async)Validators (#48679)

router

Commit Description
feat - f982a3f965 Opt-in for binding Router information to component inputs (#49633)
fix - fa3909e8b4 Ensure initial navigation clears current navigation when blocking (#49572)

Special Thanks

Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, John Manners, Johnny Gérard, Kristiyan Kostadinov, Matthieu Riegler, Pawel Kozlowski, Sarthak Thakkar and Vinit Neogi

16.0.0-next.5 (2023-03-29)

Breaking Changes

bazel

  • Several changes to the Angular Package Format (APF)
    • Removal of FESM2015
    • Replacing ES2020 with ES2022
    • Replacing FESM2020 with FESM2022
  • Several changes to the Angular Package Format (APF)
    • Removal of FESM2015
    • Replacing ES2020 with ES2022
    • Replacing FESM2020 with FESM2022

common

  • If the 'ngTemplateOutletContext' is different from the context, it will result in a compile-time error.

Before the change, the following template was compiling:

interface MyContext {
  $implicit: string;
}

@Component({
  standalone: true,
  imports: [NgTemplateOutlet],
  selector: 'person',
  template: `
    <ng-container
      *ngTemplateOutlet="
        myTemplateRef;
        context: { $implicit: 'test', xxx: 'xxx' }
      "></ng-container>
  `,
})
export class PersonComponent {
  myTemplateRef!: TemplateRef<MyContext>;
}

However, it does not compile now because the 'xxx' property does not exist in 'MyContext', resulting in the error: 'Type '{ $implicit: string; xxx: string; }' is not assignable to type 'MyContext'.'

The solution is either:

  • add the 'xxx' property to 'MyContext' with the correct type or
  • add '$any(...)' inside the template to make the error disappear. However, adding '$any(...)' does not correct the error but only preserves the previous behavior of the code.

core

    • entryComponents has been deleted from the @NgModule and @Component public APIs. Any usages can be removed since they weren't doing anyting.
    • ANALYZE_FOR_ENTRY_COMPONENTS injection token has been deleted. Any references can be removed.
  • ComponentRef.setInput will only set the input on the
    component if it is different from the previous value (based on Object.is
    equality). If code relies on the input always being set, it should be
    updated to copy objects or wrap primitives in order to ensure the input
    value differs from the previous call to setInput.

Deprecations

core

  • makeStateKey, StateKey and TransferState exports have been moved from @angular/platform-browser to @angular/core. Please update the imports.
- import {makeStateKey, StateKey, TransferState} from '@angular/platform-browser';
+ import {makeStateKey, StateKey, TransferState} from '@angular/core';
  • The @Directive/@Component moduleId property is now
    deprecated. It did not have any effect for multiple major versions and
    will be removed in v17.

platform-server

  • PlatformConfig.baseUrl and PlatformConfig.useAbsoluteUrl platform-server config options are deprecated as these were not used.

common

Commit Description
fix - 6499f5ae28 invalid ImageKit transformation (#49201)
fix - d47fef72cb strict type checking for ngtemplateoutlet (#48374)

compiler

Commit Description
fix - 1829542aea do not unquote CSS values (#49460)
fix - 73d2f3c866 handle trailing comma in object literal (#49535)

compiler-cli

Commit Description
feat - 03d1d00ad9 Add an extended diagnostic for nSkipHydration (#49512)

core

Commit Description
feat - 89d291c367 add assertInInjectionContext (#49529)
feat - 605c536420 add migration to remove moduleId references (#49496)
feat - 9c5fd50de4 effects can optionally return a cleanup function (#49625)
feat - c024574f46 expose makeStateKey, StateKey and TransferState (#49563)
feat - 9b65b84cb9 Mark components for check if they read a signal (#49153)
feat - 585e34bf6c remove entryComponents (#49484)
fix - be23b7ce65 ComponentRef.setInput only sets input when not equal to previous (#49607)
fix - 316c91b1a4 deprecate moduleId @Component property (#49496)
fix - fdafdb78dc set style property value to empty string instead of an invalid value (#49460)

http

Commit Description
fix - 45a6ac09fd force macro task creation during HTTP request (#49546)

migrations

Commit Description
feat - 5e5dac278d Migration to remove Router guard and resolver interfaces (#49337)

platform-browser

Commit Description
fix - e8e36811d5 set nonce attribute in a platform compatible way (#49624)

platform-server

Commit Description
refactor - e99460865e deprecate useAbsoluteUrl and baseUrl (#49546)

router

Commit Description
fix - 2dbf3e0023 Ensure Router preloading works with lazy component and static children (#49571)
fix - d3018c0ee7 fix #49457 outlet activating with old info (#49459)
fix - 3c7e637374 Route matching should only happen once when navigating (#49163)
fix - 1600687fe5 Route matching should only happen once when navigating (#49163)

Special Thanks

Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Asaf Malin, Jan Cabadaj, Jessica Janiuk, JiaLiPassion, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Sid, Tano Abeleyra and tomalaforge

16.0.0-next.4 (2023-03-22)

Breaking Changes

platform-server

  • renderApplication method no longer accepts a root component as first argument. Instead, provide a bootstrapping function that returns a Promise<ApplicationRef>.

    Before

    const output: string = await renderApplication(RootComponent, options);
    

    Now

    const bootstrap = () => bootstrapApplication(RootComponent, appConfig);
    const output: string = await renderApplication(bootstrap, options);
    

compiler

Commit Description
feat - 13dd614cd1 add support for compile-time required inputs (#49453)
feat - 8f539c11f4 add support for compile-time required inputs (#49468)

core

Commit Description
feat - 17e9862653 add API to provide CSP nonce for inline stylesheets (#49444)
feat - d1617c449d allow removal of previously registered DestroyRef callbacks (#49493)
fix - 230345876c Allow TestBed.configureTestingModule to work with recursive cycle of standalone components. (#49473)
fix - e655e8a603 more accurate matching of classes during content projection (#48888)

migrations

Commit Description
fix - 546b285ec1 preserve trailing commas in code generated by standalone migration (#49533)

platform-browser

Commit Description
fix - c934a8e72b only add ng-app-id to style on server side (#49465)

platform-server

Commit Description
refactor - 41f27ad086 remove renderApplication overload that accepts a component (#49463)

Special Thanks

Aditya Srinivasan, Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Jessica Janiuk, Kristiyan Kostadinov, Masaoki Kobayashi, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Peter Götz, Thomas Pischke, Virginia Dooley and avmaxim

16.0.0-next.3 (2023-03-16)

Breaking Changes

core

  • The APP_ID token value is no longer randomly generated. If you are bootstrapping multiple application on the same page you will need to set to provide the APP_ID yourself.

    bootstrapApplication(ComponentA, {
      providers: [
       { provide: APP_ID, useValue: 'app-a' },
       // ... other providers ...
      ]
    });
    

router

  • ComponentFactoryResolver has been removed from Router APIs.
    Component factories are not required to create an instance of a component
    dynamically. Passing a factory resolver via resolver argument is no longer needed
    and code can instead use ViewContainerRef.createComponent without the
    factory resolver.

Deprecations

core

  • EnvironmentInjector.runInContext is now deprecated, with
    runInInjectionContext functioning as a direct replacement:

    // Previous method version (deprecated):
    envInjector.runInContext(fn);
    // New standalone function:
    runInInjectionContext(envInjector, fn);
    

platform-browser

  • BrowserModule.withServerTransition has been deprecated. APP_ID should be used instead to set the application ID.
    NB: Unless, you render multiple Angular applications on the same page, setting an application ID is not necessary.

    Before:

    imports: [
      BrowserModule.withServerTransition({ appId: 'serverApp' }),
      ...
    ]
    

    After:

    imports: [
      BrowserModule,
      { provide: APP_ID, useValue: 'serverApp' },
      ...
    ],
    

compiler

Commit Description
feat - 1a6ca68154 add support for compile-time required inputs (#49304)

core

Commit Description
feat - 0814f20594 introduce runInInjectionContext and deprecate prior version (#49396)
fix - 0e5f9ba6f4 generate consistent component IDs (#48253)
refactor - 82d6fbb109 generate a static application ID (#49422)

platform-browser

Commit Description
feat - 630af63fae deprecate withServerTransition call (#49422)
fix - 9165ff2517 reuse server generated component styles (#48253)

platform-server

Commit Description
feat - 056d68002f add provideServerSupport function to provide server capabilities to an application (#49380)

router

Commit Description
fix - c0b1b7becf Remove deprecated ComponentFactoryResolver from APIs (#49239)

service-worker

Commit Description
feat - 5e7fc259ea add function to provide service worker (#48247)

Special Thanks

Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Esteban Gehring, Jessica Janiuk, JiaLiPassion, Julien Saguet, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner and Virginia Dooley

16.0.0-next.2 (2023-03-08)

Breaking Changes

common

  • Deprecated XhrFactory export from @angular/common/http has been removed. Use XhrFactory from @angular/common instead.

core

  • zone.js versions 0.11.x and 0.12.x are not longer supported.

platform-server

  • renderModuleFactory has been removed. Use renderModule instead.

Deprecations

platform-browser

  • ApplicationConfig has moved, please import ApplicationConfig from @angular/core instead.

common

Commit Description
refactor - c41a21658c remove deprecated XhrFactory export from http entrypoint (#49251)

compiler

Commit Description
feat - 1407a9aeaf support multiple configuration files in extends (#49125)

core

Commit Description
feat - 4e9531f777 add mergeApplicationConfig method (#49253)
feat - fdf61974d1 drop support for zone.js versions <=0.12.0 (#49331)

migrations

Commit Description
fix - 2fbaee3cbe add protractor support if protractor imports are detected (#49274)

platform-browser

Commit Description
fix - 2312eb53ef KeyEventsPlugin should keep the same behavior (#49330)
refactor - 3aa85a8087 move ApplicationConfig to core (#49253)

platform-server

Commit Description
feat - b5278cc115 renderApplication now accepts a bootstrapping method (#49248)
refactor - 17abe6dc96 remove deprecated renderModuleFactory (#49247)

router

Commit Description
feat - ea32c3289a Expose information about the last successful Navigation (#49235)

Special Thanks

Alan Agius, Andrew Kushnir, Andrew Scott, Dylan Hunn, Jessica Janiuk, JiaLiPassion, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Sai Kartheek Bommisetty and Vinit Neogi

16.0.0-next.1 (2023-03-01)

Breaking Changes

compiler

    • TypeScript 4.8 is no longer supported.

core

  • Node.js v14 support has been removed

    Node.js v14 is planned to be End-of-Life on 2023-04-30. Angular will stop supporting Node.js v14 in Angular v16. Angular v16 will continue to officially support Node.js versions v16 and v18.

router

  • Tests which mock ActivatedRoute instances may need to be adjusted
    because Router.createUrlTree now does the right thing in more
    scenarios. This means that tests with invalid/incomplete ActivatedRoute mocks
    may behave differently than before. Additionally, tests may now navigate
    to a real URL where before they would navigate to the root. Ensure that
    tests provide expected routes to match.
    There is rarely production impact, but it has been found that relative
    navigations when using an ActivatedRoute that does not appear in the
    current router state were effectively ignored in the past. By creating
    the correct URLs, this sometimes resulted in different navigation
    behavior in the application. Most often, this happens when attempting to
    create a navigation that only updates query params using an empty
    command array, for example router.navigate([], {relativeTo: route, queryParams: newQueryParams}). In this case, the relativeTo property
    should be removed.

common

Commit Description
fix - 3c9d49a4d7 make Location.normalize() return the correct path when the base path contains characters that interfere with regex syntax. (#49181)

compiler

Commit Description
feat - 79cdfeb392 drop support for TypeScript 4.8 (#49155)

compiler-cli

Commit Description
fix - b6c6dfd278 do not persist component analysis if template/styles are missing (#49184)

core

Commit Description
feat - 99d874fe3b add support for TypeScript 5.0 (#49126)
feat - 0f5c8003cc introduce concept of DestroyRef (#49158)
fix - e9edea363c update zone.js peerDependencies ranges (#49244)
refactor - f594725951 remove Node.js v14 support (#49255)

migrations

Commit Description
fix - 87affadb87 avoid migrating the same class multiple times in standalone migration (#49245)
fix - 7dd19570e8 delete barrel exports in standalone migration (#49176)

platform-server

Commit Description
fix - a08a8ff108 bundle @angular/domino in via esbuild (#49229)

router

Commit Description
feat - 455c728525 helper functions to convert class guards to functional (#48709)
fix - 7e35a917c5 add error message when using loadComponent with a NgModule (#49164)
fix - 31f210bf2c Router.createUrlTree should work with any ActivatedRoute (#48508)

Special Thanks

Alan Agius, Andrew Kushnir, Andrew Scott, Aristeidis Bampakos, Craig Spence, Doug Parker, Iván Navarro, Jessica Janiuk, JiaLiPassion, Joey Perrott, Kristiyan Kostadinov, Matthieu Riegler, Michael Ziluck, Paul Gschwendtner, Pawel Kozlowski, Stephanie Tuerk, Vincent and Virginia Dooley

16.0.0-next.0 (2023-02-22)

Breaking Changes

  • Angular Compatibility Compiler (ngcc) has been removed and as a result Angular View Engine libraries will no longer work

common

  • MockPlatformLocation is now provided by default in tests.
    Existing tests may have behaviors which rely on
    BrowserPlatformLocation instead. For example, direct access to the
    window.history in either the test or the component rather than going
    through the Angular APIs (Location.getState()). The quickest fix is to
    update the providers in the test suite to override the provider again
    TestBed.configureTestingModule({providers: [{provide: PlatformLocation, useClass: BrowserPlatformLocation}]}).
    The ideal fix would be to update the code to instead be compatible with
    MockPlatformLocation instead.

core

  • RendererType2.styles no longer accepts nested arrays.

router

  • The Scroll event's routerEvent property may also be
    a NavigationSkipped event. Previously, it was only a NavigationEnd
    event.
  • The RouterEvent type is no longer present in the Event union type representing all router event types. If you have code using something like filter((e: Event): e is RouterEvent => e instanceof RouterEvent), you'll need to update it to filter((e: Event|RouterEvent): e is RouterEvent => e instanceof RouterEvent).

Commit Description
refactor - 48aa96ea13 remove Angular Compatibility Compiler (ngcc) (#49101)

common

Commit Description
feat - 5dce2a5a3a Provide MockPlatformLocation by default in BrowserTestingModule (#49137)

core

Commit Description
feat - bc5ddabdcb add Angular Signals to the public API (#49150)
perf - 9b9c818f99 change RendererType2.styles to accept only a flat array (#49072)

router

Commit Description
fix - 1f055b90b6 Ensure anchor scrolling happens on ignored same URL navigations (#48025)
fix - 1e32709e0e remove RouterEvent from Event union type (#46061)

Special Thanks

Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Cédric Exbrayat, Joey Perrott, Mladen Jakovljević and Pawel Kozlowski