Skip to content

Bug: Can't change inputs of components with zoneless change detection #12061

@jahusa02

Description

@jahusa02

Description of the bug

I'm using Angular 20.2 with vitest through analogjs plugin.
We recently made the switch to zoneless because its promoted stable.
When rendering Components through the MockRenderFactory and passing input values via a props object (like its mentioned in the docs), changing the props and run fixture.detectChanges() where sufficient to trigger changeDetection in zonefull.

With zoneless this doesn't work anymore. Tried with fixture.whenStable() and fixture.whenRenderingDone(), ngMocks.input() and setInput from the componentRef, but no luck. Also tried simple MockRender.

Only running fixture.changeDetectorRef.markForCheck will trigger change Detection.

When trying this with TestBed.createComponent it will work like expected when setting Input via setInput, so I guess this is related to how the MockRender works but idk.

Maybe I'm doing something wrong

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions