nav-push.d.ts 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import { NavController } from '../../navigation/nav-controller';
  2. import { Page } from '../../navigation/nav-util';
  3. /**
  4. * @name NavPush
  5. * @description
  6. * Directive to declaratively push a new page to the current nav
  7. * stack.
  8. *
  9. * @usage
  10. * ```html
  11. * <button ion-button [navPush]="pushPage"></button>
  12. * ```
  13. *
  14. * To specify parameters you can use array syntax or the `navParams`
  15. * property:
  16. *
  17. * ```html
  18. * <button ion-button [navPush]="pushPage" [navParams]="params">Go</button>
  19. * ```
  20. *
  21. * Where `pushPage` and `params` are specified in your component,
  22. * and `pushPage` contains a reference to a
  23. * component you would like to push:
  24. *
  25. * ```ts
  26. * import { LoginPage } from './login';
  27. *
  28. * @Component({
  29. * template: `<button ion-button [navPush]="pushPage" [navParams]="params">Go</button>`
  30. * })
  31. * class MyPage {
  32. * pushPage: any;
  33. * params: Object;
  34. * constructor(){
  35. * this.pushPage = LoginPage;
  36. * this.params = { id: 42 };
  37. * }
  38. * }
  39. * ```
  40. *
  41. * @demo /docs/demos/src/navigation/
  42. * @see {@link /docs/components#navigation Navigation Component Docs}
  43. * @see {@link ../NavPop NavPop API Docs}
  44. *
  45. */
  46. export declare class NavPush {
  47. _nav: NavController;
  48. /**
  49. * @input {Page | string} The component class or deeplink name you want to push onto the navigation stack.
  50. */
  51. navPush: Page | string;
  52. /**
  53. * @input {any} Any NavParams you want to pass along to the next view.
  54. */
  55. navParams: {
  56. [k: string]: any;
  57. };
  58. constructor(_nav: NavController);
  59. /**
  60. * @hidden
  61. */
  62. onClick(): boolean;
  63. }