-
+
-
+
diff --git a/src/lib/menu/menu-directive.ts b/src/lib/menu/menu-directive.ts
index bdfcc1507b34..7bde6f80ff2a 100644
--- a/src/lib/menu/menu-directive.ts
+++ b/src/lib/menu/menu-directive.ts
@@ -54,8 +54,15 @@ export class MdMenu implements AfterContentInit, MdMenuPanel, OnDestroy {
@ContentChildren(MdMenuItem) items: QueryList;
@Input() overlapTrigger = true;
- constructor(@Attribute('x-position') posX: MenuPositionX,
- @Attribute('y-position') posY: MenuPositionY) {
+ constructor(@Attribute('xPosition') posX: MenuPositionX,
+ @Attribute('yPosition') posY: MenuPositionY,
+ @Attribute('x-position') deprecatedPosX: MenuPositionX,
+ @Attribute('y-position') deprecatedPosY: MenuPositionY) {
+
+ // TODO(kara): Remove kebab-case attributes after next release
+ if (deprecatedPosX) { this._setPositionX(deprecatedPosX); }
+ if (deprecatedPosY) { this._setPositionY(deprecatedPosY); }
+
if (posX) { this._setPositionX(posX); }
if (posY) { this._setPositionY(posY); }
this.setPositionClasses(this.positionX, this.positionY);
diff --git a/src/lib/menu/menu.md b/src/lib/menu/menu.md
index d78a0fba903e..18f3f7899946 100644
--- a/src/lib/menu/menu.md
+++ b/src/lib/menu/menu.md
@@ -4,7 +4,7 @@
By itself, the `` element does not render anything. The menu is attached to and opened
via application of the `mdMenuTriggerFor` directive:
-```ts
+```html
@@ -53,9 +53,20 @@ Menus support displaying `md-icon` elements before the menu item text.
### Customizing menu position
By default, the menu will display below (y-axis), after (x-axis), and overlapping its trigger. The position can be changed
-using the `x-position` (`before | after`) and `y-position` (`above | below`) attributes.
+using the `xPosition` (`before | after`) and `yPosition` (`above | below`) attributes.
The menu can be be forced to not overlap the trigger using `[overlapTrigger]="false"` attribute.
+```html
+
+
+
+
+
+
+```
+
### Keyboard interaction
- DOWN_ARROW: Focuses the next menu item