How to create an Angular Element with Angular Material?

Viewed 532

I am creating an Angular Element in which I am using Angular Material design. The Material contents are not getting rendered in the browser, but it's showing up on the DOM.

My element template looks like this:

<h1>Hello world!</h1>
<mat-menu #appMenu="matMenu">
  <button mat-menu-item>Settings</button>
  <button mat-menu-item>Help</button>
</mat-menu>

<button mat-icon-button [matMenuTriggerFor]="appMenu">
  <mat-icon>more_vert</mat-icon>Click Me!
</button>

Final output

1 Answers

For mat-menu it's not rendered inside HTML until it's not visible.

You could check this Demo click on last button.

Related