2

I have built Microfrontend Architecture using Angular elements. In my angular application I have given the path of the image in the assets folder for one of my image. For eg.,

<img src="assets/images/icons/order.svg" alt="image">

in app.module.ts

ngDoBootstrap() { 
    const orderApp = createCustomElement(AppComponent, { injector: this.injector }); 
    customElements.define('order-application', orderApp ); 
  }

Once I build my application, my application is available as an element, and can be embedded in some other application.

<order-application></order-application>
<script src="order/order-elements-es2015.js" defer></script>

But the image above is not taking my angular app path. How to specify the path of the base application. Please suggest.

Shwetha
  • 903
  • 8
  • 15
  • Does this answer your question? [How should I reference assets in angular custom element (Web Components)](https://stackoverflow.com/questions/52683368/how-should-i-reference-assets-in-angular-custom-element-web-components) – Vikas Jun 30 '21 at 13:37

0 Answers0