[ Web Proxy ]
URL:
Viewing: https://angular.dev/api/core/CreateEffectOptions [Back]  [Original]

CreateEffectOptions Angular Skip to main content
menu
close
more_horiz
menuAPI
@angular/core

CreateEffectOptions

interface
stablesince v20.0

Options passed to the effect function.

On this page

    arrow_upward_alt Back to the top

    API

        
          interface CreateEffectOptions {  injector?: Injector | undefined;  manualCleanup?: boolean | undefined;  allowSignalWrites?: boolean | undefined;  debugName?: string | undefined;}
        
        

    injector

    Injector | undefined

    The Injector in which to create the effect.

    If this is not provided, the current injection context will be used instead (via inject).

    manualCleanup

    boolean | undefined

    Whether the effect should require manual cleanup.

    If this is false (the default) the effect will automatically register itself to be cleaned up with the current DestroyRef.

    If this is true and you want to use the effect outside an injection context, you still need to provide an Injector to the effect.

    allowSignalWrites

    boolean | undefined
    @deprecated

    no longer required, signal writes are allowed by default.

    debugName

    string | undefined

    A debug name for the effect. Used in Angular DevTools to identify the effect.

    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page