- Home
- Forum
- Angular - EJ 2
- Dropdownlist component not worked with Angular component factory resolver.
Dropdownlist component not worked with Angular component factory resolver.
I have implemented dynamic component loading into my app using a component factory resolver with ViewContainerRef. When I define Syncfusion control like ejs-radiobutton and ejs-dropdownlist. it won't work properly and shown an error as below.
error NG8001: 'ejs-radiobutton' is not a known element:
1. If 'ejs-radiobutton' is an Angular component, then verify that it is part of this module.
2. If 'ejs-radiobutton' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
The error occurs only when I used only with dynamic component loading. So please tell me what exactly I need to do?
Attachment: Screenshots_2b1a3688.zip
SIGN IN To post a reply.
6 Replies
1 reply marked as answer
PM
Ponmani Murugaiyan
Syncfusion Team
April 21, 2021 03:48 PM UTC
Hi Swapnil,
Thanks for contacting Syncfusion support.
We checked your reported issue based on provided information. Based on your given error list, we suspect that the reported issue is caused due to DropDownListModule and RadioButtonModule are not imported in the app.module.ts. So, we suggest you import DropDownList and RadioButton module into Angular application(src/app/app.module.ts) from the package @syncfusion/ej2-angular-dropdowns and @syncfusion/ej2-angular-buttons.
Please follow the instructions in the below documentation to render the component.
Please find the sample below for reference:
Kindly check with the above suggestion to get rid of the reported issue and revert us if you need further assistance.
Regards,
Ponmani M
SM
Swapnil Muley
April 23, 2021 11:01 AM UTC
I have already imported that module into app.module.ts file but still, it shows an error. This error occurs only when I use these controls with dynamic component loading otherwise it works fine with another component in the same app.
Attachment: files_a04da4ae.zip
PFA
Attachment: files_a04da4ae.zip
PM
Ponmani Murugaiyan
Syncfusion Team
April 26, 2021 05:01 PM UTC
Hi Swapnil,
Thanks for the update.
Currently we are checking the reported query. We will update further details in 2 business days (April 28, 2021). We appreciate your patience until then.
Regards,
Ponmani M
PM
Ponmani Murugaiyan
Syncfusion Team
April 29, 2021 02:44 AM UTC
Hi Swapnil,
Thanks for the patience.
Based on your provided code snippet, we have prepared sample with your reported requirement “dynamic component render approach with Angular component factory resolver” and ensured in our end. It is working as expected, please find the sample below for reference.
Kindly check with the above sample. If issue still exists in your end, please try to replicate the issue in the above provided sample which helps us to check and provide you the solution at earliest.
Regards,
Ponmani M
Marked as answer
SM
Swapnil Muley
April 29, 2021 05:25 AM UTC
Thanks for providing the code sample but I have already implemented this successfully by taking reference from your forum about dynamic Treeview component loading. It helps me to solve my issue and the app working properly now.
PM
Ponmani Murugaiyan
Syncfusion Team
April 30, 2021 06:40 AM UTC
Hi Swapnil,
We are glad to know that the reported issue has been resolved in your end. Please get back us if you need further assistance.
Regards,
Ponmani M
SIGN IN To post a reply.
- 6 Replies
- 2 Participants
- Marked answer
-
SM Swapnil Muley
- Apr 20, 2021 05:32 AM UTC
- Apr 30, 2021 06:40 AM UTC