I'm trying to show an overlay when clicking on a menu item (Example: clicking on item 1, item 2 or item 3). So far I have this button (Click me) that when you click on it it shows an overlay right below it. I want to have the same functionality when clicking on any menu item. Does anyone know how to get this to work?
Here's my code:
<p-menubar [model]="menuItems"></p-menubar>
<p-overlayPanel #op>
Content
</p-overlayPanel>
<br/><br/>
<button type="text" pButton label="Click me" (click)="op.toggle($event)"></button>