Skip to content
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

Improve ViewContainerRef.createComponent docs #43602

Open
AndrewKushnir opened this issue Sep 26, 2021 · 0 comments
Open

Improve ViewContainerRef.createComponent docs #43602

AndrewKushnir opened this issue Sep 26, 2021 · 0 comments
Labels
area: core Issues related to the framework runtime core: dynamic view creation doc-topic: reference Use only with "comp: docs" for issues in the reference topics P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: needs eng input
Milestone

Comments

@AndrewKushnir
Copy link
Contributor

AndrewKushnir commented Sep 26, 2021

Description

Current documentation of the ViewContainerRef.createComponent (https://angular.io/api/core/ViewContainerRef#createComponent) should be improved, specifically:

  • the projectableNodes format is quite unclear (why it's an array of arrays and how to use it)
  • it's unclear why ngModuleRef should be provided and what's its role
  • the injector and ngModuleRef relationship is not clearly documented (they do have an overlap from DI perspective)
  • there are no examples on how this API can be used (even though, this is a central API for dynamic component creation)

This is inspired by the recent changes to the ViewContainerRef.createComponent function within PR #43022, see #43022 (comment) and #43022 (comment).

What is the affected URL?

https://angular.io/api/core/ViewContainerRef#createComponent

@AndrewKushnir AndrewKushnir added area: core Issues related to the framework runtime comp: docs core: dynamic view creation labels Sep 26, 2021
@ngbot ngbot bot added this to the needsTriage milestone Sep 26, 2021
@aikithoughts aikithoughts added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Oct 5, 2021
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Oct 5, 2021
@bob-watson bob-watson added the doc-topic: reference Use only with "comp: docs" for issues in the reference topics label Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to the framework runtime core: dynamic view creation doc-topic: reference Use only with "comp: docs" for issues in the reference topics P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: needs eng input
Projects
None yet
Development

No branches or pull requests

5 participants