feat(core): add createComponent and reflectComponentType functions#46685
feat(core): add createComponent and reflectComponentType functions#46685AndrewKushnir wants to merge 4 commits intoangular:mainfrom
createComponent and reflectComponentType functions#46685Conversation
|
This is great replacement for component factories! |
460d222 to
274f4a3
Compare
createComponentRef and createComponentMirror functionscreateComponentRef and reflectComponentType functions
|
@gund thanks for the feedback. We discussed this question with the team further and decided to rename the function to |
pkozlowski-opensource
left a comment
There was a problem hiding this comment.
LGTM overall but I would like to discuss the API surface, see https://github.com/angular/angular/pull/46685/files#r916504416
atscott
left a comment
There was a problem hiding this comment.
LGTM assuming the change from createComponentRef -> createComponent is made, as discussed.
f1af445 to
5a47792
Compare
|
@alxhub thanks for the review, the comments are now addressed. Could you please take a final look at the public API when you get a chance? Thank you. |
|
You can preview 5a47792 at https://pr46685-5a47792.ngbuilds.io/. |
This commit introduces a new function that allows creating a `ComponentRef` instance based on provided Component and a set of options. The function can be used to cover a number of use-cases where the `ComponentFactory` symbol was used previously. Closes angular#45263.
This commit introduces a new function that allows creating a object which exposes a number of getters to retrieve information about a given component. Closes angular#44926.
This commit refactors the code to move some functions around to avoid circular dependencies in TS imports. The newly added functions are now located in the `packages/core/src/render3/component.ts` file (instead of `packages/core/src/render3/component_ref.ts`), which is a better place for them anyway.
This commit updates the `inputs` and `outputs` objects of the `ComponentMirror` to mark their properties as readonly.
5a47792 to
cb82edc
Compare
|
You can preview cb82edc at https://pr46685-cb82edc.ngbuilds.io/. |
|
This PR was merged into the repository by commit 4a81fe7. |
This commit refactors the code to move some functions around to avoid circular dependencies in TS imports. The newly added functions are now located in the `packages/core/src/render3/component.ts` file (instead of `packages/core/src/render3/component_ref.ts`), which is a better place for them anyway. PR Close #46685
|
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. |
See individual commits.
Resolves #45263 and #44926.
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?