feat(menu): expose close method on element scope; deprecate $mdOpenMenu #9193
Conversation
* You can then close the menu programatically by injecting `$mdMenu` and calling | ||
* `$mdMenu.hide()`. | ||
* You can then close the menu either by using `$mdCloseMenu()` in the template, | ||
* or programatically by injecting `$mdMenu` and calling `$mdMenu.hide()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in programmatically
43b29d1
to
3c72444
Compare
3c72444
to
213ca7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, can you add a demo for it?
I had updated the usage example @EladBezalel, or do you want a "proper" demo? |
749cf5f
to
065e8b9
Compare
@EladBezalel it's updated to have a demo showing how to use the custom triggers. |
Marking as |
I think it deserves a proper demo |
065e8b9
to
4494a12
Compare
@ThomasBurleson I've updated this to include:
|
LGTM. |
* Deprecates the `$mdOpenMenu` method in favor of `$mdMenu.open` in order to simplify the API. * Exposes the `$mdMenu.close` method on the menu's scope, allowing for custom closing behavior. Fixes angular#8446.
4494a12
to
c4161a7
Compare
Nice work on this. Will $mdOpenMenu break if I update from 1.1.1 to 1.1.3?
|
It won't break, but it will log a deprecation warning. |
Great thanks. I see that a breaking change has been introduced to 1.1.2. Should the minor version be bumped instead of the patch version? |
I'm not sure, I haven't been involved with that particular change. |
$mdOpenMenu
method in favor of$mdMenu.open
in order to simplify the API.$mdMenu.close
method on the menu's scope, allowing for custom closing behavior.Fixes #8446.