Skip to content

Can't set signal from within async piped Observable #50382

@ChellappanRajan

Description

@ChellappanRajan

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

I don't know

Description

When attempting to assign a signal value from within an Observable that is being piped to an async function, I encounter an below issue.

Error: NG0600: Writing to signals is not allowed in a computed or an effect by default. Use allowSignalWrites in the CreateEffectOptions to enable this inside effects.

However I am not using effect here.

SO:https://stackoverflow.com/questions/76291361/cant-set-signal-from-within-async-piped-observable

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/angular-cehebt?file=src%2Fmain.ts

Please provide the exception or error you saw

Error: NG0600: Writing to signals is not allowed in a computed or an effect by default. Use allowSignalWrites in the CreateEffectOptions to enable this inside effects.

Please provide the environment you discovered this bug in (run ng version)

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions