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

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

OutputEmitterRef

Class

An OutputEmitterRef is created by the output() function and can be used to emit values to consumers of your directive or component.

Custom events with outputs

On this page

    arrow_upward_alt Back to the top

    API

        
          class OutputEmitterRef<T> implements OutputRef<T> {  subscribe(callback: (value: T) => void): OutputRefSubscription;  emit(value: T): void;}
        
        

    subscribe

    OutputRefSubscription
    @paramcallback(value: T) => void

    emit

    void

    Emits a new value to the output.

    @paramvalueT
    @returnsvoid

    Description

    An OutputEmitterRef is created by the output() function and can be used to emit values to consumers of your directive or component.

    Consumers of your directive/component can bind to the output and subscribe to changes via the bound event syntax. For example:

    <my-comp (valueChange)="processNewValue($event)" />
    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page