Skip to content

mat-menu generation using dynamic data not showing arrow and nested sub-menus on hover #16457

Closed
@mujiak

Description

@mujiak

Reproduction

I am trying to generate n-level nested mat-menu using dynamic data,

If you repeat the reproduction steps with static html you will get the same issue.

here is theStackBlitz https://stackblitz.com/edit/angular-dlzv3q-fofemy

Steps to reproduce:

  1. wrap mat-menu-item in a ng-template outside of mat-menu
  2. use ng-container with ngTemplateOutlet inside mat-menu to render template created in step 1

Expected Behavior

mat-menu should display the arrow for nested mat-menu and on hover it should display the nested mat-menu

Actual Behavior

mat-menu is showing only top-level mat-menu-items without arrow and hover behavior, but on clicking an mat-menu-item(which have nested menu) main menu closes and nested menu opens up..

Environment

  • Angular: 8.1.0
  • CDK/Material: 8.0.2
  • Browser(s): Chrome
  • Operating System: Windows

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions