a zip code crypto-currency system good for red ONLY

menu-close.js 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { Directive, HostListener, Input } from '@angular/core';
  2. import { MenuController } from '../app/menu-controller';
  3. /**
  4. * @name MenuClose
  5. * @description
  6. * The `menuClose` directive can be placed on any button to close an open menu.
  7. *
  8. * @usage
  9. *
  10. * A simple `menuClose` button can be added using the following markup:
  11. *
  12. * ```html
  13. * <button ion-button menuClose>Close Menu</button>
  14. * ```
  15. *
  16. * To close a certain menu by its id or side, give the `menuClose`
  17. * directive a value.
  18. *
  19. * ```html
  20. * <button ion-button menuClose="left">Close Left Menu</button>
  21. * ```
  22. *
  23. * @demo /docs/demos/src/menu/
  24. * @see {@link /docs/components#menus Menu Component Docs}
  25. * @see {@link ../../menu/Menu Menu API Docs}
  26. */
  27. var MenuClose = (function () {
  28. function MenuClose(_menu) {
  29. this._menu = _menu;
  30. }
  31. /**
  32. * @hidden
  33. */
  34. MenuClose.prototype.close = function () {
  35. var menu = this._menu.get(this.menuClose);
  36. menu && menu.close();
  37. };
  38. MenuClose.decorators = [
  39. { type: Directive, args: [{
  40. selector: '[menuClose]'
  41. },] },
  42. ];
  43. /** @nocollapse */
  44. MenuClose.ctorParameters = function () { return [
  45. { type: MenuController, },
  46. ]; };
  47. MenuClose.propDecorators = {
  48. 'menuClose': [{ type: Input },],
  49. 'close': [{ type: HostListener, args: ['click',] },],
  50. };
  51. return MenuClose;
  52. }());
  53. export { MenuClose };
  54. //# sourceMappingURL=menu-close.js.map