a zip code crypto-currency system good for red ONLY

nav-push.js 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 NavPush
  16. * @description
  17. * Directive to declaratively push a new page to the current nav
  18. * stack.
  19. *
  20. * @usage
  21. * ```html
  22. * <button ion-button [navPush]="pushPage"></button>
  23. * ```
  24. *
  25. * To specify parameters you can use array syntax or the `navParams`
  26. * property:
  27. *
  28. * ```html
  29. * <button ion-button [navPush]="pushPage" [navParams]="params">Go</button>
  30. * ```
  31. *
  32. * Where `pushPage` and `params` are specified in your component,
  33. * and `pushPage` contains a reference to a
  34. * component you would like to push:
  35. *
  36. * ```ts
  37. * import { LoginPage } from './login';
  38. *
  39. * @Component({
  40. * template: `<button ion-button [navPush]="pushPage" [navParams]="params">Go</button>`
  41. * })
  42. * class MyPage {
  43. * pushPage: any;
  44. * params: Object;
  45. * constructor(){
  46. * this.pushPage = LoginPage;
  47. * this.params = { id: 42 };
  48. * }
  49. * }
  50. * ```
  51. *
  52. * @demo /docs/demos/src/navigation/
  53. * @see {@link /docs/components#navigation Navigation Component Docs}
  54. * @see {@link ../NavPop NavPop API Docs}
  55. *
  56. */
  57. var NavPush = (function () {
  58. function NavPush(_nav) {
  59. this._nav = _nav;
  60. if (!_nav) {
  61. console.error('navPush must be within a NavController');
  62. }
  63. }
  64. /**
  65. * @hidden
  66. */
  67. NavPush.prototype.onClick = function () {
  68. if (this._nav && this.navPush) {
  69. this._nav.push(this.navPush, this.navParams);
  70. return false;
  71. }
  72. return true;
  73. };
  74. NavPush.decorators = [
  75. { type: core_1.Directive, args: [{
  76. selector: '[navPush]'
  77. },] },
  78. ];
  79. /** @nocollapse */
  80. NavPush.ctorParameters = function () { return [
  81. { type: nav_controller_1.NavController, decorators: [{ type: core_1.Optional },] },
  82. ]; };
  83. NavPush.propDecorators = {
  84. 'navPush': [{ type: core_1.Input },],
  85. 'navParams': [{ type: core_1.Input },],
  86. 'onClick': [{ type: core_1.HostListener, args: ['click',] },],
  87. };
  88. return NavPush;
  89. }());
  90. exports.NavPush = NavPush;
  91. });
  92. //# sourceMappingURL=nav-push.js.map