Skip to content

feat(core): add unsafeListenToOutput to ComponentRef - #56320

Closed
JeanMeche wants to merge 1 commit into
angular:mainfrom
JeanMeche:core/compref-listen
Closed

JeanMeche wants to merge 1 commit into
angular:mainfrom
JeanMeche:core/compref-listen

Conversation

@JeanMeche

Copy link
Copy Markdown
Member

This commit adds a method to the ComponentRef class that allows to listen to outputs. It abstracts the underlying EventEmitter or OutputEmitterRef and returns a anonymous function to unsubscribe.

@angular-robot angular-robot Bot added the detected: feature PR contains a feature commit label Jun 7, 2024
@JeanMeche
JeanMeche force-pushed the core/compref-listen branch 2 times, most recently from 09d58f3 to 8c34d80 Compare June 7, 2024 11:18
@JeanMeche
JeanMeche force-pushed the core/compref-listen branch from 8c34d80 to a659550 Compare June 7, 2024 11:21
@JeanMeche
JeanMeche force-pushed the core/compref-listen branch 4 times, most recently from ed049dd to 38e2ef6 Compare June 7, 2024 16:11
@JeanMeche
JeanMeche force-pushed the core/compref-listen branch from 38e2ef6 to cad0b5d Compare June 17, 2024 07:27
@angular-robot angular-robot Bot added the area: core Issues related to the framework runtime label Jun 17, 2024
@ngbot ngbot Bot added this to the Backlog milestone Jun 17, 2024
@JeanMeche
JeanMeche force-pushed the core/compref-listen branch from cad0b5d to c016c37 Compare June 17, 2024 07:46
@JeanMeche
JeanMeche marked this pull request as ready for review June 17, 2024 08:05
@JeanMeche
JeanMeche force-pushed the core/compref-listen branch 2 times, most recently from cb94c2e to 5798cfb Compare June 17, 2024 09:20
@JeanMeche
JeanMeche force-pushed the core/compref-listen branch 2 times, most recently from 467478e to a0a6c2e Compare August 29, 2024 09:28
@JeanMeche
JeanMeche force-pushed the core/compref-listen branch from a0a6c2e to c773a4e Compare October 10, 2024 10:42
@JeanMeche
JeanMeche requested a review from devversion October 10, 2024 10:42
@JeanMeche JeanMeche changed the title feat(core): add listen to ComponentRef feat(core): add unsafeListenToOutput to ComponentRef Oct 10, 2024
@angular-robot angular-robot Bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 10, 2024
@devversion devversion added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Oct 15, 2024
@devversion

Copy link
Copy Markdown
Member

Just to capture: I think this is not 100% ready, as we could have a "safe" method where possible. Related discussion: here, or in some other thread.

@angular-robot angular-robot Bot added the area: core Issues related to the framework runtime label Oct 15, 2024
@JeanMeche
JeanMeche force-pushed the core/compref-listen branch from ad53588 to 744f7f6 Compare October 15, 2024 14:40
@angular-robot angular-robot Bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 15, 2024
@ngbot ngbot Bot modified the milestone: Backlog Oct 15, 2024
@JeanMeche
JeanMeche force-pushed the core/compref-listen branch from 744f7f6 to f2df530 Compare October 15, 2024 14:46
@angular-robot angular-robot Bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 15, 2024
@ngbot ngbot Bot modified the milestone: Backlog Oct 15, 2024
@JeanMeche
JeanMeche force-pushed the core/compref-listen branch from f2df530 to 5415e99 Compare October 15, 2024 15:07
@angular-robot angular-robot Bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 15, 2024
@ngbot ngbot Bot modified the milestone: Backlog Oct 15, 2024
@devversion
devversion marked this pull request as draft October 15, 2024 15:28
@JeanMeche
JeanMeche marked this pull request as ready for review October 15, 2024 15:29
@JeanMeche
JeanMeche marked this pull request as draft October 15, 2024 15:29
@devversion
devversion removed their request for review October 15, 2024 15:31
@JeanMeche
JeanMeche marked this pull request as ready for review October 15, 2024 15:32
@JeanMeche JeanMeche removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Oct 15, 2024
@angular-robot angular-robot Bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Dec 19, 2024
…tRef`

This commit adds 2 methods to the `ComponentRef` class that allows to listen to outputs. It abstracts the underlying `EventEmitter` or `OutputEmitterRef` and returns a anonymous function to unsubscribe.
@JeanMeche
JeanMeche force-pushed the core/compref-listen branch from 15f6f1a to fe1d474 Compare January 14, 2025 19:41
@JeanMeche JeanMeche closed this Apr 1, 2025
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators May 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: core Issues related to the framework runtime detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants