-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsdocsThis issue is related to documentationThis issue is related to documentation
Description
Bug, feature request, or proposal:
Bug - mistake in documentation for material.angular.io
What is the expected behavior?
Working according to documentation/example.
What is the current behavior?
This example:
https://material.angular.io/components/menu/overview#passing-in-data-to-a-menu
is not working, throws error
"Template parse errors: "let-" is only supported on ng-template elements."
What are the steps to reproduce?
https://stackblitz.com/edit/angular-rlfbhk
What is the use-case or motivation for changing an existing behavior?
... i think motivation is obvious. There is a malfunctioned example in documentation.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
all
Is there anything else we should know?
working example is here, at the very bottom in .spec
https://github.com/angular/material2/blob/master/src/lib/menu/menu.spec.ts
<button
[matMenuTriggerFor]="menu"
[matMenuTriggerData]="{label: 'one'}"
#triggerOne="matMenuTrigger">One</button>
<button
[matMenuTriggerFor]="menu"
[matMenuTriggerData]="{label: 'two'}"
#triggerTwo="matMenuTrigger">Two</button>
<mat-menu matMenuContent #menu="matMenu">
<ng-template let-label="label" matMenuContent>
<button mat-menu-item>{{label}}</button>
</ng-template>
</mat-menu>
Current documentation is here:
https://github.com/angular/material2/blob/master/src/lib/menu/menu.md
anton-107, DanielYKPan and dennybiasiolli
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsdocsThis issue is related to documentationThis issue is related to documentation