Packages

@angular/common

22.2.6 · 12 Nov 2026MIT8.1M / weekRepositoryHomepagenpmAtom feed

Your version

22.0.0

major3 Jun 2026Where it was published

22.3.0 is the newest release of 22.x.

In short

22 breaking3 deprecated

  • Breaking

    This change will trigger the nullishCoalescingNotNullable and optionalChainNotNullable diagnostics on exisiting projects. You might want to disable those 2 diagnotiscs in your tsconfig temporarily.

  • Breaking

    Data prefixed attribute no-longer bind inputs nor outputs.

  • Breaking

    The compiler will throw when there a when inputs, outputs or model are binding to the same input/outputs.

  • Breaking

    in variables will throw in template expressions.

  • Breaking

    Elements with multiple matching selectors will now throw at compile time.

  • Breaking

    The second arguement of appRef.bootstrap does not accept any anymore. Make sure the element you pass is not nullable.

  • Breaking
    • TypeScript versions older than 6.0 are no longer supported.

  • Breaking

    Leave animations are no longer limited to the element being removed.

Security

Release note

Blog post "Announcing Angular v22".

Breaking Changes

compiler

  • Breaking

    This change will trigger the nullishCoalescingNotNullable and optionalChainNotNullable diagnostics on exisiting projects.
    You might want to disable those 2 diagnotiscs in your tsconfig temporarily.

  • Breaking

    Data prefixed attribute no-longer bind inputs nor outputs.

  • Breaking

    The compiler will throw when there a when inputs, outputs or model are binding to the same input/outputs.

  • Breaking

    in variables will throw in template expressions.

compiler-cli

  • Breaking

    Elements with multiple matching selectors will now throw at compile time.

core

  • Breaking

    The second arguement of appRef.bootstrap does not accept any anymore. Make sure the element you pass is not nullable.

  • Breaking
    • TypeScript versions older than 6.0 are no longer supported.

  • Breaking

    Leave animations are no longer limited to the element being removed.

  • Breaking

    Component with undefined changeDetection property are now OnPush by default. Specify changeDetection: ChangeDetectionStrategy.Eager to keep the previous behavior.

  • Breaking

    Change AnimationCallbackEvent.animationComplete signature

  • Breaking

    ChangeDetectorRef.checkNoChanges was removed. In tests use fixture.detectChanges() instead.

  • Breaking

    createNgModuleRef was removed, use createNgModule instead

  • Breaking

    ComponentFactoryResolver and ComponentFactory are no longer available. Pass the component class directly to APIs that previously required a factory, such as ViewContainerRef.createComponent or use the standalone createComponentFunction.

  • Breaking

    ComponentFactoryResolver and ComponentFactory are no longer available. Pass the component class directly to APIs that previously required a factory, such as ViewContainerRef.createComponent or use the standalone createComponent function.

forms

  • Breaking

    min and max validation rules no longer support
    string values. Bound values must be numbers or null.

http

  • Breaking

    Use the HttpXhrBackend with provideHttpClient(withXhr) if you want to keep supporting upload progress reports.

platform-browser

  • Breaking

    This removes styles when they appear to no longer be used by an associated host. However other DOM on the page may still be affected by those styles if not leveraging ViewEncapsulation.Emulated or if those styles are used by elements outside of Angular, potentially causing other DOM to appear unstyled.

  • Breaking

    Hammer.js integration has been removed. Use your own implementation.

router

  • Breaking

    The return type for TitleStrategy.getResolvedTitleForRoute
    was previously 'any' while the actual return type could only be either string
    or undefined. The return type now reflects the possible values correctly.
    Code that reads the value may need to be adjusted.

    (cherry picked from commit ad37f52)

  • Breaking

    The currentSnapshot parameter in CanMatchFn and the canMatch method of the CanMatch interface is now required. While this was already the behavior of the Router at runtime, existing class implementations of CanMatch must now include the third argument to satisfy the interface.

  • Breaking

    paramsInheritanceStrategy now defaults to 'always'

    The default value of paramsInheritanceStrategy has been changed from 'emptyOnly' to 'always'. This means that route parameters are inherited from all parent routes by default. To restore the previous behavior, set paramsInheritanceStrategy to 'emptyOnly' in your router configuration.

  • Breaking

    provideRoutes() has been removed. Use provideRouter() or ROUTES as multi token if necessary.

upgrade

  • Deprecated

    Deprecated getAngularLib/setAngularLib have been removed use getAngularJSGlobal/setAngularJSGlobal instead.

Deprecations

http

  • Deprecated

    withFetch is now deprecated, it can be safely removed.

  • Deprecated

    The reportProgress option is deprecated please use reportUploadProgress & reportDownloadProgress instead.

compiler

CommitTypeDescription
47fcbc4704featallow safe navigation to correctly narrow down nullables
2896c93cc1featAngular expressions with optional chaining returns undefined
e850643b1bfeatSupport comments in html element.
96be4f429bfixabstract emitter producing incorrect code for dynamic imports
488d962bc7fixDon't bind inputs/outputs for data- attributes
2c5aabb9dafixdon't escape dollar sign in literal expression
c7aef8ec5dfixenforce parentheses containing arguments for :host-context
b225a5d902fixinvalid type checking code if field name needs to be quoted
ab9154ab75fixnormalize tag names with custom namespaces in DomElementSchemaRegistry (#68868)
8a1533c9adfixpreserve leading commas in animation definitions
194f723f66fixremove dedicated support for legacy shadow DOM selectors
4c25a42e98fixremove deprecated shadow CSS encapsulation polyfills
6ff620a033fixsanitize dynamic href and xlink:href bindings on SVG a elements (#68868)
7dc1017e51fixsimplify handling of colon host with a selector list
d99ab0e040fixstop generating unused field
03db2aefaafixthrow on duplicate input/outputs
786ef8261ffixthrow on invalid in expressions
ccb7d427e4fixtype check invalid for loops

compiler-cli

CommitTypeDescription
b8d3f36ed9featadd support for Node.js 26.0.0
7f9450219ffeatAdds warning for prefetch without main defer trigger
2eae497a04featsupport external TCBs with copied content in specific mode
e5f96c2d88fixanimation events not type checked properly when bound through HostListener decorator
9218140348fixresolve TCB mapping failure for safe property reads with as any
7a0d6b8df2fixtransform dropping exclamationToken from properties
ca67828ee2refactorintroduce NG8023 compile-time diagnostic for duplicate selectors

core

CommitTypeDescription
17d3ea44e2featadd IdleRequestOptions support to IdleService
3b0ae5fef0featadd provideWebMcpTools
444b024d49featAdd a injectAsync helper function
3bc095d508featAdd a schematics to migrate provideHttpClient to keep using the HttpXhrBackend implementation.
5a7c1e62dcfeatadd ability to cache resources for SSR
cb4cb77053featAdd migration to add ChangeDetectionStrategy.Eager where applicable
2206efa55ffeatadd special return statuses for resource params
246a984a5dfeatadd TestBed.getFixture
b918beda32featallow debouncing signals
8bc31a515ffeatAllow other expression for exhaustive typechecking
4e331062e8featallow synchronous values for stream Resources
a0aa8304cdfeatbootstrap via ApplicationRef with config
9c55fcb3e6featde-duplicate host directives
8fe025f514featdrop support for TypeScript 5.9
2f5ab541eafeatenhance profiling with documentation URLs
ef1810197bfeatexport experimental declareWebMcpTool support
75f2cb8f56featimplement Angular DI graph in-page AI tool
8f3d0b9d97featintroduce @Service decorator
df659b8d0cfeatre-introduce nested leave animations scoped to component boundaries
8ce9cc4f6bfeatregister AI runtime debugging tools
eae8f7e30bfeatSet default Component changeDetection strategy to OnPush
cdda51a3b2featsupport bootstrapping Angular applications underneath shadow roots
a5981b83a6featsupport customization of @defer's on idle behavior
98eb24cea0featSupport optional timeout for idle deferred triggers
dc3131c639featTestBed.getFixture -> TestBed.getLastFixture and update implementation
9f479ae964featUpdate Testability to use PendingTasks for stability indicator
8ebae1de33fixallow service with factory on abstract classes
f9d8da6924fixbind global context to idle callback shims in @defer's idle service
61a48e99aafixdo not register dom triggers when defer blocks are in manual mode
49748b5c79fixenforce return type for service factory
16adbbf423fixensure custom controls resolve transitive host directives
50e599e73efixlazy-initialize debounced state to prevent computation cycle
7aad302c3efixmark service decorator as stable
a08e4fb93cfixnormalize tag names in runtime i18n attribute security context lookup (#68868)
b20f0fe078fixprevent rxResource from leaking a subscription
22f8b0a500fixresolver function not matching expected type
88d138ccc8fixsupport prefix-insensitive DOM schema lookups and compile-time i18n attribute validation
bfe6f6c2a5fixsynchronize core sanitization schema with compiler
5e99ae9f00fixwiden type for directive inputs/outputs
b9b5c279b4refactorenhance AnimationCallbackEvent.animationComplete signature
69fb1614efrefactorremove checkNoChanges from the public API.
36936872c9refactorremove createNgModuleRef
9d76ac8229refactorremove ComponentFactoryResolver & ComponentFactory from the api surface
b1f5181ffdrefactorremove ComponentFactoryResolver & ComponentFactory from the api surface""

forms

CommitTypeDescription
74f76d8075featadd reloadValidation to Signal Forms to manually trigger async validation
24e52d450dfeatadd debounce option to validateAsync and validateHttp
709f5a390cfeatadd FieldState.getError()
7745365910featgraduate signal forms APIs to public API
f9f24fc669featshim legacy NG_VALIDATORS into parseErrors for CVA mode (#67943)
41b1410cb8featsupport binding `number
3983080236featsupport ngNoCva as an opt-out for ControlValueAccessors
c4ce3f345ffeattemplate & reactive support for FVC
3524de29f3fixAdd support for range type with outside of native bounds
de56d74da3fixalign FormField CVA selection priority with standard forms
0eeb1b5f03fixallow FormRoot to be used without submission options (#67727)
394ad0c2a2fixallow late-bound input types for signals forms
ee8d2098cbfixchange FieldState optional properties to non-optional
df8b020299fixclear native date inputs correctly in signal forms when changed via native UI
2e9aeea0fefixdeduplicate writeValue calls in CVA interop
0ea50ffe5afixensure debounced async validators produce pending status during debounce
3c44d7c90bfixfix orphan field error on blur during array removal
849dba6c65fiximplement custom control reset propagation
5835a5e3a7fixprevent orphan field crashes in debounceSync and async validation
3e7ce0dafcfixrestrict SignalFormsConfig to a readonly API
fb166772d2fixsplit the touched model into an input and touch output
83032e3605fixsupport generic unions in signal form schemas
68c3abbe09fixsynchronize controls with the model on reset
2061fd8253fixUntrack setValue in reactive forms
72d3ace03cfixuse controlValue in NgControl for CVA interop (#67943)
3b4ef1e2ffperfavoid redundant invalidations in parser errors signal
07a9358157perfavoid spurious recomputation in FormField.parseErrors
98c5afdb02perflazily instantiate signal form fields
e0536091f5perfoptimize reactivity by using shallow array equality
9b9769479bperfshortcut deepSignal writes if value is unchanged
592a12d6c9refactorremove string support from min and max validation rules (#68001)

http

CommitTypeDescription
5c432fb8bbfeatUse FetchBackend as default for the HttpBackend implementation
f7b3ed8db2fixIntroduce a max buffer size for fetch requests on SSR
e6cfaf5672fixprevent httpResource from leaking a subscription
7c8c3347efrefactorAdd reportUploadProgress & reportDownloadProgress options

language-service

CommitTypeDescription
5a6d88626bfeatadd angular template inlay hints support
cfd0f9950cfeatadd Document Symbols support for Angular templates
c6f98c723cfeatAdd support for idle timeout in defer blocks
dc9c72da9bfixAdd support for @Input with transforms

migrations

CommitTypeDescription
8216d34976featAdd migration for CanMatchFn snapshot parameter (#67452)
682aaf943ffeatadd strictTemplates to tsconfig during ng update
6a435658e2featDisabling nullishCoalescingNotNullable & optionalChainNotNullable on ng update
8f8972b0fdfeatmodel + output migrations
f01901d766fixavoid generating invalid code in ChangeDetectionStrategy.Eager migration
1415d86980fixFix typo for strict-template migration
9d9855a415fixMake the safe optional chaining idempotent
0f2160c410fixremove compiler import from safe optional chaining migration

platform-browser

CommitTypeDescription
68628dd45bfeatmake incremental hydration default behavior
d45b7a91f9fixremove unused styles when associated host is dropped
f99e7ed20frefactorremove Hammer integration

router

CommitTypeDescription
89c9a4de30featAdd options optional parameter for withComponentInputBinding
c84642ac16featadd unmatchedInputBehavior option to componentInputBinding
3683902234featadds browserUrl input support to router links
3e7117d690fixAdd strict typing on 'getResolvedTitleForRoute'
579440170bfixmake currentSnapshot required in CanMatchFn (#67452)
17d10f7a99fixset default paramsInheritanceStrategy to 'always'
bdb6ae9dbcrefactorremove deprecated provideRoutes function.

service-worker

CommitTypeDescription
836094c072fixresolve TS 6.0 compatibility for messageerror listener

upgrade

CommitTypeDescription
01a179577brefactorremove getAngularLib/setAngularLib

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.