diff --git a/src/components/menu/js/menuServiceProvider.js b/src/components/menu/js/menuServiceProvider.js index 3650f3cbb5d..9096f731bc6 100644 --- a/src/components/menu/js/menuServiceProvider.js +++ b/src/components/menu/js/menuServiceProvider.js @@ -2,14 +2,56 @@ angular .module('material.components.menu') .provider('$mdMenu', MenuProvider); +/** Handles behavior for a menu while it is open, including: +* +* - handling animating the menu opening/closing +* - handling key/mouse events on the menu element +* - handling enabling/disabling scroll while the menu is open +* - handling redrawing during resizes and orientation changes +*/ + +/** + * @ngdoc service + * @name $mdMenu + * @module material.components.menu + * + * @description + * `$mdMenu` is a service that is available within the scope of an `md-menu` directive. + * + * ## Usage + * + * + * + * + * + * Open + * + * + * + * + * Clicking me will also close the menu + * + * + * + * + */ + +/** + * @ngdoc method + * @name $mdMenu#open + * @param {$event} $event By passing $event as argument, the corresponding event is stopped from propagating up the + * DOM-tree + * + * @description + * Opens the menu within the `md-menu` scope + */ + /** - * Interim element provider for the menu. - * Handles behavior for a menu while it is open, including: - * - handling animating the menu opening/closing - * - handling key/mouse events on the menu element - * - handling enabling/disabling scroll while the menu is open - * - handling redrawing during resizes and orientation changes + * @ngdoc method + * @name $mdMenu#close * + * @description + * Closes the menu within the `md-menu` scope */ function MenuProvider($$interimElementProvider) {