'Single-spa Angular material error in loading

I'm developing my own SPA website and i try single-spa, when i use angular material in the HTML i notice the example menu is very diferent vs angular alone:

Single-Spa Menu Material enter image description here

Second Image

See image

As you can see the menu is loaded in diferent moment, i dont know much about single-spa, and in angular example:

enter image description here

I use:

  • Angular 13
  • Material 13
  • Single-spa

PD: I use the menu example in material page: https://material.angular.io/components/menu/examples

Here is the code:

<button mat-button [matMenuTriggerFor]="aboveMenu">Above</button>
<mat-menu #aboveMenu="matMenu" yPosition="above">
  <button mat-menu-item>Item 1</button>
  <button mat-menu-item>Item 2</button>
</mat-menu>

<button mat-button [matMenuTriggerFor]="belowMenu">Below</button>
<mat-menu #belowMenu="matMenu" yPosition="below">
  <button mat-menu-item>Item 1</button>
  <button mat-menu-item>Item 2</button>
</mat-menu>

<button mat-button [matMenuTriggerFor]="beforeMenu">Before</button>
<mat-menu #beforeMenu="matMenu" xPosition="before">
  <button mat-menu-item>Item 1</button>
  <button mat-menu-item>Item 2</button>
</mat-menu>


<button mat-button [matMenuTriggerFor]="afterMenu">After</button>
<mat-menu #afterMenu="matMenu" xPosition="after">
  <button mat-menu-item>Item 1</button>
  <button mat-menu-item>Item 2</button>
</mat-menu>

If anyone know what is happen i really aprecciate

Greetings !

  • I try to build a single-spa Angular material website example with menu

  • The menu example is not loaded correctly with the material Angular



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source