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 createComponent and reflectComponentType functions
#46685
Conversation
|
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 |
LGTM overall but I would like to discuss the API surface, see https://github.com/angular/angular/pull/46685/files#r916504416
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 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. PR Close angular#46685
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. PR Close angular#46685
…#46685) 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 angular#46685
…ngular#46685) This commit updates the `inputs` and `outputs` objects of the `ComponentMirror` to mark their properties as readonly. PR Close angular#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?