router-link-delegate.d.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import { LocationStrategy } from '@angular/common';
  2. import { ElementRef, OnChanges, OnInit } from '@angular/core';
  3. import { Router, RouterLink } from '@angular/router';
  4. import type { AnimationBuilder, RouterDirection } from '@ionic/core/components';
  5. import { NavController } from '../../providers/nav-controller';
  6. import * as i0 from "@angular/core";
  7. /**
  8. * Adds support for Ionic routing directions and animations to the base Angular router link directive.
  9. *
  10. * When the router link is clicked, the directive will assign the direction and
  11. * animation so that the routing integration will transition correctly.
  12. */
  13. export declare class RouterLinkDelegateDirective implements OnInit, OnChanges {
  14. private locationStrategy;
  15. private navCtrl;
  16. private elementRef;
  17. private router;
  18. private routerLink?;
  19. routerDirection: RouterDirection;
  20. routerAnimation?: AnimationBuilder;
  21. constructor(locationStrategy: LocationStrategy, navCtrl: NavController, elementRef: ElementRef, router: Router, routerLink?: RouterLink | undefined);
  22. ngOnInit(): void;
  23. ngOnChanges(): void;
  24. /**
  25. * The `tabindex` is set to `0` by default on the host element when
  26. * the `routerLink` directive is used. This causes issues with Ionic
  27. * components that wrap an `a` or `button` element, such as `ion-item`.
  28. * See issue https://github.com/angular/angular/issues/28345
  29. *
  30. * This method removes the `tabindex` attribute from the host element
  31. * to allow the Ionic component to manage the focus state correctly.
  32. */
  33. private updateTabindex;
  34. private updateTargetUrlAndHref;
  35. /**
  36. * @internal
  37. */
  38. onClick(ev: UIEvent): void;
  39. static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkDelegateDirective, [null, null, null, null, { optional: true; }]>;
  40. static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkDelegateDirective, ":not(a):not(area)[routerLink]", never, { "routerDirection": { "alias": "routerDirection"; "required": false; }; "routerAnimation": { "alias": "routerAnimation"; "required": false; }; }, {}, never, never, false, never>;
  41. }
  42. export declare class RouterLinkWithHrefDelegateDirective implements OnInit, OnChanges {
  43. private locationStrategy;
  44. private navCtrl;
  45. private elementRef;
  46. private router;
  47. private routerLink?;
  48. routerDirection: RouterDirection;
  49. routerAnimation?: AnimationBuilder;
  50. constructor(locationStrategy: LocationStrategy, navCtrl: NavController, elementRef: ElementRef, router: Router, routerLink?: RouterLink | undefined);
  51. ngOnInit(): void;
  52. ngOnChanges(): void;
  53. private updateTargetUrlAndHref;
  54. /**
  55. * @internal
  56. */
  57. onClick(): void;
  58. static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkWithHrefDelegateDirective, [null, null, null, null, { optional: true; }]>;
  59. static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkWithHrefDelegateDirective, "a[routerLink],area[routerLink]", never, { "routerDirection": { "alias": "routerDirection"; "required": false; }; "routerAnimation": { "alias": "routerAnimation"; "required": false; }; }, {}, never, never, false, never>;
  60. }