angular/angular · error · Error
@Output ${propertyName} not initialized in '${instance.const
Error message
@Output ${propertyName} not initialized in '${instance.constructor.name}'. What it means
Error "@Output ${propertyName} not initialized in '${instance.constructor.name}'." thrown in angular/angular.
Source
Thrown at packages/core/src/render3/view/directive_outputs.ts:122
}
export function listenToOutput(
tNode: TNode,
lView: LView,
directiveIndex: number,
lookupName: string,
eventName: string,
listenerFn: WrappedEventCallback,
) {
ngDevMode && assertIndexInRange(lView, directiveIndex);
const instance = lView[directiveIndex];
const tView = lView[TVIEW];
const def = tView.data[directiveIndex] as DirectiveDef<unknown>;
const propertyName = def.outputs[lookupName];
const output = instance[propertyName];
if (ngDevMode && !isOutputSubscribable(output)) {
throw new Error(`@Output ${propertyName} not initialized in '${instance.constructor.name}'.`);
}
const subscription = (output as SubscribableOutput<unknown>).subscribe(listenerFn);
storeListenerCleanup(tNode.index, tView, lView, eventName, listenerFn, subscription, true);
}
/**
* Whether the given value represents a subscribable output.
*
* For example, an `EventEmitter, a `Subject`, an `Observable` or an
* `OutputEmitter`.
*/
function isOutputSubscribable(value: unknown): value is SubscribableOutput<unknown> {
return (
value != null && typeof (value as Partial<SubscribableOutput<unknown>>).subscribe === 'function'
);
}
View on GitHub (pinned to 51cb07e980)
Solutions
- Initialize the @Output with an EventEmitter or output() in the directive class.
When it happens
Trigger: Thrown at packages/core/src/render3/view/directive_outputs.ts:122 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of angular/angular@51cb07e980 (2026-08-22).
Data as JSON: /api/errors/36a77b239ee581c8.
Report an issue: GitHub.