-2

I am creating custom web components using Angular (14). It works fine in the Angular application. But when I am planning to use it in AngularJS, I need some help.

How can I use custom web components from microfronted into another? Are there any articles or sample example links which can guide me further?

3
  • What exactly is your issue? Your question is kind of broad. Usually, web components are registered globally on your site. So if one microfrontend registers a webcomponent you can use it in every microfrontend Commented Sep 7, 2022 at 7:25
  • @Lalaluka : To start over, i created a Microfrontend app using single-spa and have one app in angular and another in angularjs. I created web component using angular elements and able to use web component in angular application. But unable to see the web component when the single-spa uses angularjs code for displaying the application. So i was trying to figure out if there is a way for inter-communication among different micro-frontend app. I created a web component in angular Commented Sep 7, 2022 at 14:58
  • What is "microfronted"? Commented Aug 1, 2023 at 18:44

1 Answer 1

-1

I think you should be looking in to Webpack Module Federation. It helps one JavaScript application to use another easily. This concept is used commonly in angular micro front-ends.

Please read https://webpack.js.org/concepts/module-federation/

And go through this answer

https://stackoverflow.com/a/68908854/14673615

Hope this helps

Sign up to request clarification or add additional context in comments.

2 Comments

This question is about web components in single-spa not microfrontends with module federation.
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.