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
Alternative way for depreciation of ComponentFactory in order to get componentFactory inputs #44926
Comments
I am going to comment on a similar example in which I have tried to find an alternative solution but have not found it. I have defined this variable that exports some components that I need to create with the @angular/elements library
And then in the app.module I have the following to define the Web Components. For that I need to get the selector and I get it with the ComponentFactoryResolver:
At the internal core level, I can't comment because I don't control it, but it would still be a good idea to leave the new way of creating components and this way of working with components. At the moment it is only deprecated but I read that in version 16 it was going to be removed... |
Same problem here. Our entire application framework relies on dynamic views that are created on behalf of a (JSON) view model that can be modified by the user at runtime. This model also contains values for input properties that are set on the view component after creation. Currently, we use
|
I have the same problem i need the selector any alternative? |
Same problem here. I'm creating dynamic dashboards where all of their components are created dynamically depending on the dashboard instance type. I need to get the components' inputs and outputs to validate that I'm setting them all correctly and to bind their values. |
@alxhub , @AndrewKushnir is this block me from upgrade to angular 14 ? |
@ofirrifo it should not block you from upgrading to Angular v14, the |
…ed code As there is currently no API available to replace it See angular/angular#44926
…ed code As there is currently no API available to replace it See angular/angular#44926
…ed code As there is currently no API available to replace it See angular/angular#44926
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.
@pkozlowski-opensource since one of your latest features (#46641) it is possible to set an input value (including marking for change ...). I think this could/would solve this issue. And as a bonus one would not have to rely on try / catch if the input is not available. |
@demike |
@pkozlowski-opensource I agree, the |
On ComponentRef the non-tree-shakable code would be like:
|
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 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 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 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 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 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 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 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
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
Since Angular 13 the ComponentFactory is deprecated.
Since it depreciated I need an alternative way to get the
inputs
property that I used to get from the instance of ComponentFactorythis.componentFactory.inputs
Here is example of code where I'm using the inputs
Now that ComponentFactory is deprecated what is the alternative to get the
inputs
property?Please provide a link to a minimal reproduction of the bug
above there is a code with the example of my problem
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: