outputBinding
Creates an output binding.
API
function outputBinding<T>( eventName: string, listener: (event: T) => unknown, ): Binding;
@parameventName
stringPublic name of the output to listen to.
@paramlistener
(event: T) => unknownFunction to be called when the output emits.
Usage example
In this example we create an instance of the MyCheckbox component and listen to its onChange event.
interface CheckboxChange {
value: string;
}
createComponent(MyCheckbox, {
bindings: [
outputBinding<CheckboxChange>('onChange', event => console.log(event.value))
],
});
@returns
Binding
Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/core/outputBinding