Can't bind to 'mdMenuTriggerFor' since it isn't a known property of 'button'
Bug, feature request, or proposal:
I've imported MdMenu into my module and now am trying to add a menu trigger to my button
<button md-icon-button [mdMenuTriggerFor]="menu">
<md-icon>more_vert</md-icon>
</button>
What is the expected behavior?
Trigger menu
What is the current behavior?
get error: Can't bind to 'mdMenuTriggerFor' since it isn't a known property of 'button'
What are the steps to reproduce?
Providing a Plunker (or similar) is the best way to get the team to see your issue. Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, browsers are affected?
Is there anything else we should know?
When errors like that appear, make sure which are the modules you imported in module which your component (with the error) is declared. In this case the missed module is the MatMenuModule.
Uncaught Error: Template parse errors: Can't bind to 'mat-MenuTriggerData' since it isn't a known property of 'button'. (" [matMenuTriggerFor]="menu">Menu <button mat-menu-item [matMenuTriggerFor]="category" [ERROR ->][mat-MenuTriggerData]="{category: 'Starters'}">
What is solution for this
@Akshaykulkarni995 the solution to that is posted above by multiple people.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.