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

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

OutputRef

interface

A reference to an Angular output.

Subscribing to outputs programmatically

On this page

    arrow_upward_alt Back to the top

    API

        
          interface OutputRef<T> {  subscribe(callback: (value: T) => void): OutputRefSubscription;}
        
        

    subscribe

    OutputRefSubscription

    Registers a callback that is invoked whenever the output emits a new value of type T.

    Angular will automatically clean up the subscription when the directive/component of the output is destroyed.

    @paramcallback(value: T) => void
    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page