Add `ApplicationRef.destroy` method

feat(core): add `ApplicationRef.destroy` method (#45624)
Add `ApplicationRef.destroy` methodfeatadd applicationref destroy method core

Committed by AndrewKushnir

commit message
feat(core): add `ApplicationRef.destroy` method (#45624)

This commit implements the `destroy` method on the `ApplicationRef` class. This feature is a preparation for the new logic to bootstrap (and teardown) standalone components (without going through the `NgModuleRef` destroy), which would return an instance of the `ApplicationRef` (the current bootstrap APIs return an instance of the `NgModuleRef`).
 
PR Close #45624

Editor assessment

An exemplary feature message. The subject is exact — adding `ApplicationRef.destroy` — under an accurate `feat(core)` pairing. The body teaches the architectural why: this prepares new bootstrap and teardown logic for standalone components that returns an `ApplicationRef` directly, unlike current APIs that return an `NgModuleRef`. That contrast gives a reader real design context, not a restatement. Footers are the single well-formed `PR Close #45624` trailer. Style is clean: imperative subject, no trailing period, moderate length, no pasted material, consistent language. The message stands alone — a reader understands the API, its purpose, and its direction without opening any diff.

Browse categories

More feat examples · Back to search