• Overview

This site uses cookies from Google to deliver its services and to analyze traffic.

@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.

API

  
    class OutputEmitterRef<T> implements OutputRef<T> {}
  
  

constructor

OutputEmitterRef<T>
@returnsOutputEmitterRef<T>

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