@angular/cdk/overlay#CdkScrollable TypeScript Examples

The following examples show how to use @angular/cdk/overlay#CdkScrollable. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: dialog-content.component.ts    From alauda-ui with MIT License 6 votes vote down vote up
@Component({
  selector: 'aui-dialog-content',
  templateUrl: './dialog-content.component.html',
  encapsulation: ViewEncapsulation.None,
  changeDetection: ChangeDetectionStrategy.OnPush,
  preserveWhitespaces: false,
})
export class DialogContentComponent extends CdkScrollable {
  bem: Bem = buildBem('aui-dialog');

  // eslint-disable-next-line @typescript-eslint/no-useless-constructor
  constructor(
    elementRef: ElementRef<HTMLElement>,
    scrollDispatcher: ScrollDispatcher,
    ngZone: NgZone,
    dir?: Directionality,
  ) {
    super(elementRef, scrollDispatcher, ngZone, dir);
  }
}
Example #2
Source File: dialog-ref.ts    From alauda-ui with MIT License 6 votes vote down vote up
constructor(
    private readonly overlayRef: OverlayRef,
    public dialogInstance: DialogComponent,
    scrollDispatcher: ScrollDispatcher,
    ngZone: NgZone,
  ) {
    dialogInstance.id = this.id;
    this.scrollable = new CdkScrollable(
      { nativeElement: overlayRef.overlayElement },
      scrollDispatcher,
      ngZone,
    );
    this.scrollable.ngOnInit();
  }
Example #3
Source File: back-top.component.ts    From alauda-ui with MIT License 5 votes vote down vote up
constructor(@Optional() private readonly cdkScrollable: CdkScrollable) {}
Example #4
Source File: dialog-ref.ts    From alauda-ui with MIT License 5 votes vote down vote up
private readonly scrollable: CdkScrollable;