a zip code crypto-currency system good for red ONLY

nav-pop.js 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. (function (factory) {
  2. if (typeof module === "object" && typeof module.exports === "object") {
  3. var v = factory(require, exports);
  4. if (v !== undefined) module.exports = v;
  5. }
  6. else if (typeof define === "function" && define.amd) {
  7. define(["require", "exports", "@angular/core", "../../navigation/nav-controller"], factory);
  8. }
  9. })(function (require, exports) {
  10. "use strict";
  11. Object.defineProperty(exports, "__esModule", { value: true });
  12. var core_1 = require("@angular/core");
  13. var nav_controller_1 = require("../../navigation/nav-controller");
  14. /**
  15. * @name NavPop
  16. * @description
  17. * Directive to declaratively pop the current page off from the
  18. * navigation stack.
  19. *
  20. * @usage
  21. * ```html
  22. * <ion-content>
  23. *
  24. * <button ion-button navPop>Go Back</button>
  25. *
  26. * </ion-content>
  27. * ```
  28. *
  29. * Similar to {@link /docs/api/components/nav/NavPush/ `NavPush` }
  30. * @demo /docs/demos/src/navigation/
  31. * @see {@link /docs/components#navigation Navigation Component Docs}
  32. * @see {@link ../NavPush NavPush API Docs}
  33. */
  34. var NavPop = (function () {
  35. function NavPop(_nav) {
  36. this._nav = _nav;
  37. if (!_nav) {
  38. console.error('navPop must be within a NavController');
  39. }
  40. }
  41. /**
  42. * @hidden
  43. */
  44. NavPop.prototype.onClick = function () {
  45. // If no target, or if target is _self, prevent default browser behavior
  46. if (this._nav) {
  47. this._nav.pop().catch(function () {
  48. (void 0) /* console.debug */;
  49. });
  50. return false;
  51. }
  52. return true;
  53. };
  54. NavPop.decorators = [
  55. { type: core_1.Directive, args: [{
  56. selector: '[navPop]'
  57. },] },
  58. ];
  59. /** @nocollapse */
  60. NavPop.ctorParameters = function () { return [
  61. { type: nav_controller_1.NavController, decorators: [{ type: core_1.Optional },] },
  62. ]; };
  63. NavPop.propDecorators = {
  64. 'onClick': [{ type: core_1.HostListener, args: ['click',] },],
  65. };
  66. return NavPop;
  67. }());
  68. exports.NavPop = NavPop;
  69. });
  70. //# sourceMappingURL=nav-pop.js.map