@ionic/angular#IonContent TypeScript Examples

The following examples show how to use @ionic/angular#IonContent. 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: expandable-header.directive.ts    From Uber-ServeMe-System with MIT License 6 votes vote down vote up
ngOnChanges(changes: SimpleChanges) {
    if(this.scrollContent && this.config) {
      this.scrollContent.scrollEvents = true;

      let scrollStartFunc = async (ev) => {
        const el = await this.scrollContent.getScrollElement();
        this.contentHeight = el.offsetHeight;
        this.scrollHeight = el.scrollHeight;
        if (this.config.maxValue === undefined) {
          this.config.maxValue = this.element.nativeElement.offsetHeight;
        }
        this.lastScrollPosition = el.scrollTop;
      };

      if(this.scrollContent && this.scrollContent instanceof IonContent) {
        this.scrollContent.ionScrollStart.subscribe(scrollStartFunc);
        this.scrollContent.ionScroll.subscribe(async (ev) => this.adjustElementOnScroll(ev));
        this.scrollContent.ionScrollEnd.subscribe(async (ev) => this.adjustElementOnScroll(ev));

      } else if(this.scrollContent instanceof HTMLElement) {
        (this.scrollContent as HTMLElement).addEventListener('ionScrollStart', scrollStartFunc);
        (this.scrollContent as HTMLElement).addEventListener('ionScroll',async (ev) => this.adjustElementOnScroll(ev));
        (this.scrollContent as HTMLElement).addEventListener('ionScrollEnd',async (ev) => this.adjustElementOnScroll(ev));
      }
    }
  }
Example #2
Source File: expandable-header.directive.ts    From Uber-ServeMe-System with MIT License 5 votes vote down vote up
@Input('scrollContent') scrollContent: IonContent;
Example #3
Source File: proposal-list.ts    From Elastos.Essentials.App with MIT License 5 votes vote down vote up
@ViewChild('content', { static: false }) content: IonContent;
Example #4
Source File: suggestion-list.ts    From Elastos.Essentials.App with MIT License 5 votes vote down vote up
@ViewChild('content', { static: false }) content: IonContent;
Example #5
Source File: coin-transfer.page.ts    From Elastos.Essentials.App with MIT License 5 votes vote down vote up
@ViewChild(IonContent) contentArea: IonContent;
Example #6
Source File: my-view-report.page.ts    From fyle-mobile-app with MIT License 5 votes vote down vote up
@ViewChild(IonContent, { static: false }) content: IonContent;
Example #7
Source File: view-team-report.page.ts    From fyle-mobile-app with MIT License 5 votes vote down vote up
@ViewChild(IonContent, { static: false }) content: IonContent;
Example #8
Source File: view-comment.component.ts    From fyle-mobile-app with MIT License 5 votes vote down vote up
@ViewChild(IonContent, { static: false }) content: IonContent;
Example #9
Source File: chat-bottom-bar.component.ts    From onchat-web with Apache License 2.0 5 votes vote down vote up
/** 页面内容 */
  @Input() ionContent: IonContent;
Example #10
Source File: chat.page.ts    From onchat-web with Apache License 2.0 5 votes vote down vote up
/** IonContent */
  @ViewChild(IonContent, { static: true }) ionContent: IonContent;
Example #11
Source File: messages.page.ts    From blog2020 with MIT License 5 votes vote down vote up
@ViewChild(IonContent, {static: true}) content!: IonContent;