ngOnDestroy method

  1. @override
void ngOnDestroy()

Executed before the directive is removed from the DOM and destroyed.

See OnDestroy for a full description.

Implementation

@override
void ngOnDestroy() {
  if (_repositionLoopId != null) {
    window.cancelAnimationFrame(_repositionLoopId!);
  }
  _visibleDisposer.dispose();
  _disposer.dispose();
  _animationTimer?.cancel();
  _isVisible = false;
  onVisibleController.add(false);
}