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

How to add a Custom Component. #1076

Open
Prasadangular-devpoint opened this issue May 7, 2024 · 3 comments
Open

How to add a Custom Component. #1076

Prasadangular-devpoint opened this issue May 7, 2024 · 3 comments

Comments

@Prasadangular-devpoint
Copy link

No description provided.

@Prasadangular-devpoint
Copy link
Author

Prasadangular-devpoint commented May 7, 2024

Previously we are using 5.x.x formio/angular to create the dynamic pages and also we added custom components,

but now we upgraded formio/angular to the latest Version 7.x.x.
but the custom component are not renderering and not loading.

i added the files which are mentioned to be added in my application code(https://github.com/formio/angular/tree/5.5.x/projects/angular-formio/src/custom-component) , but the custom component preview is not shown and getting issue as unknown component. but when we give the static html content it was rendering but not able to load the component .

@Sky-ness
Copy link

Hi there , I added the custom component files into my project today and it works for me. You have to copy 3 files into your own project (element.common.ts, register-custom-components.ts and create-custom-components.ts) . After that, you have to manage the different import into these files but for the custom tags you need to import it from the library like this "import {CustomTagsService} from '@formio/angular'" because it's an injectable. After that your component will render again . I hope it helped you =).

@bredar
Copy link

bredar commented Aug 8, 2024

We have upgraded to latest ^8.0.0-rc.8 and ^5.0.0-rc.71 and now custom components are not working anymore. They are just rendered as normal textbox components. But when the component isn't registered, and error appears.

edit: Seems that we could fix this with changeing the imports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants