dir.d.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.io/license
  7. */
  8. import { EventEmitter, AfterContentInit, OnDestroy } from '@angular/core';
  9. import { Direction, Directionality } from './directionality';
  10. /**
  11. * Directive to listen for changes of direction of part of the DOM.
  12. *
  13. * Provides itself as Directionality such that descendant directives only need to ever inject
  14. * Directionality to get the closest direction.
  15. */
  16. export declare class Dir implements Directionality, AfterContentInit, OnDestroy {
  17. /** Normalized direction that accounts for invalid/unsupported values. */
  18. private _dir;
  19. /** Whether the `value` has been set to its initial value. */
  20. private _isInitialized;
  21. /** Direction as passed in by the consumer. */
  22. _rawDir: string;
  23. /** Event emitted when the direction changes. */
  24. change: EventEmitter<Direction>;
  25. /** @docs-private */
  26. dir: Direction;
  27. /** Current layout direction of the element. */
  28. readonly value: Direction;
  29. /** Initialize once default value has been set. */
  30. ngAfterContentInit(): void;
  31. ngOnDestroy(): void;
  32. }