-
Notifications
You must be signed in to change notification settings - Fork 25.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): add ApplicationRef.destroy
method
#45624
Conversation
93c9643
to
13dfa8b
Compare
Presubmit (TGP). |
13dfa8b
to
5e94964
Compare
@@ -15,7 +15,7 @@ | |||
"master": { | |||
"uncompressed": { | |||
"runtime": 4343, | |||
"main": 451472, | |||
"main": 452174, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to reviewers: the payload size in this PR is expected (due to extra non-tree-shakable code that was added). It's ~350 bytes and the rest was accumulated already from other changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: size-tracking, public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: public-api, size-tracking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🍪
reviewed-for: public-api, size-tracking
e2dfb62
to
43e9f67
Compare
43e9f67
to
2ebd2b0
Compare
2ebd2b0
to
ae66f3c
Compare
ae66f3c
to
819558c
Compare
a343cb0
to
acaa26c
Compare
} | ||
|
||
destroy(): void { | ||
if (this._destroyed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than track this._destroyed
, we should delegate to injector.destroyed
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
936b555
to
8b30b0f
Compare
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`).
8b30b0f
to
3cf03fe
Compare
Presubmit after the rebase. |
This PR was merged into the repository by commit 174ce7d. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This commit implements the
destroy
method on theApplicationRef
class. This feature is a preparation for the new logic to bootstrap (and teardown) standalone components (without going through theNgModuleRef
destroy), which would return an instance of theApplicationRef
(the current bootstrap APIs return an instance of theNgModuleRef
).PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?