-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimearea: docsRelated to the documentationRelated to the documentation
Milestone
Description
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
Angular migrations guide (https://angular.dev/reference/migrations/outputs) suggests to migrate @Output decorators to output functions.
Though it brings in NG0953 errors if output is used after component is destroyed (see #19826 )
NG0953 is not anyhow mentioned in https://angular.dev/reference/migrations/outputs
There's no such page as https://angular.dev/errors/NG0953
Is is not easy to catch these errors after migration (especially if you do not expect them)
This error can be indication of a memory leak or a performance issue but doesn't cause any unexpected behavior
So what I can suggest:
- Improve documentation
- Make NG0953 configurable for example via
extendedDiagnostics - From my understanding NG0953 is also emitted in some other cases so probably this specific case should have a dedicated error?
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
NG0953: Unexpected emit for destroyed `OutputRef`. The owning directive/component is destroyed
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 19.1.7
Node: 22.11.0
Package Manager: yarn 4.6.0
OS: win32 x64
Angular: 19.1.6
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
... service-worker
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1901.7
@angular-devkit/build-angular 19.1.7
@angular-devkit/core 19.1.7
@angular-devkit/schematics 19.1.7
@angular/cdk 19.1.4
@angular/cli 19.1.7
@schematics/angular 19.1.7
rxjs 7.8.2
typescript 5.7.3
webpack 5.98.0
zone.js 0.15.0
Anything else?
P.S. For example unexpected crash on animation done event after component is destroyed (not trivial to resolve btw):
@HostListener('@flyInOut.done')
onAnimationEnd() {
this.animationDone.emit(this.state);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimearea: docsRelated to the documentationRelated to the documentation