Skip to content

feat(common): Expose NgComponentOutlet outputs. - #56239

Closed
JeanMeche wants to merge 1 commit into
angular:mainfrom
JeanMeche:feat/ngComponentOutlet-outputs
Closed

JeanMeche wants to merge 1 commit into
angular:mainfrom
JeanMeche:feat/ngComponentOutlet-outputs

Conversation

@JeanMeche

Copy link
Copy Markdown
Member

This commit adds the ability to subscribe to outputs of components instantiated by the NgComponentOutlet directive.

Fixes #15360.

@angular-robot angular-robot Bot added the detected: feature PR contains a feature commit label Jun 3, 2024
@JeanMeche
JeanMeche force-pushed the feat/ngComponentOutlet-outputs branch 2 times, most recently from 1dcb3c2 to 3fccae2 Compare June 3, 2024 16:06

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not account for aliases, whereas inputs do AFAIK

@JeanMeche JeanMeche Jun 3, 2024 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a better alternative than reaching for the ComponentDef ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try reflectComponentType :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It creates a new ComponentFactory on each invocation, I'm not sure it's a great usecase here.

@JeanMeche
JeanMeche force-pushed the feat/ngComponentOutlet-outputs branch from 3fccae2 to a4fa20c Compare June 3, 2024 18:12
This commit adds the ability to subscribe to outputs of components instantiated by the `NgComponentOutlet` directive.

Fixes angular#15360.
@JeanMeche
JeanMeche force-pushed the feat/ngComponentOutlet-outputs branch from a4fa20c to 1f767b4 Compare June 3, 2024 20:26
@JeanMeche
JeanMeche marked this pull request as ready for review June 3, 2024 21:07
@pullapprove
pullapprove Bot requested a review from thePunderWoman June 3, 2024 21:07
@thePunderWoman thePunderWoman added the area: common Issues related to APIs in the @angular/common package label Jun 4, 2024
@ngbot ngbot Bot added this to the Backlog milestone Jun 4, 2024
@JeanMeche

Copy link
Copy Markdown
Member Author

We'll wait to land #56320 first to rely on it.

@marsc

marsc commented Jul 26, 2024

Copy link
Copy Markdown

Cant't wait to use it.

@AXLWeb

AXLWeb commented Aug 29, 2024

Copy link
Copy Markdown

rly looking forward for this amazing feature

@MattiaMalandrone

Copy link
Copy Markdown

any news on a possible release?

@rl-carno

Copy link
Copy Markdown

Can we push this forward please? This is a really important feature, especially for developers who want to fully utilise dynamic rendering for their applications.

@JeanMeche JeanMeche closed this Apr 1, 2025
@iRoyPeleg

Copy link
Copy Markdown

Hey @JeanMeche !

Sad to see this PR closed (and related #56320 ). 😔
Is there any alternative on the horizon?
I'm currently using your suggested POC instead of using a third party lib.

Your work is much appreciated!

@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 4, 2025
@JeanMeche

Copy link
Copy Markdown
Member Author

Reviving the PR since we can now rely on bindings for outputs.

@JeanMeche

Copy link
Copy Markdown
Member Author

Rebase closed the PR, here is the new PR #63330

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: common Issues related to APIs in the @angular/common package detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There is no way to access inputs or outputs of Components created by NgComponentOutlet