[SOLVED] Ionic 3.1.0: How to get scrollHeight, scrollElement deleted in Scroll class

The “fix(scroll): memory leak” committed with Ionic 3.1.0 delete the scrollElement from the class scroll which I used to guess the scroll height.

Therefore, since it’s not deprecated but really deleted, anyone knows how to get this height with the new Scroll class?

Before Ionic 3.1.0:

@ViewChild('myScrollY') scrollY: Scroll;
this.scrollY.scrollElement.scrollHeight;

Now:

 @ViewChild('myScrollY') scrollY: Scroll;
 this.scrollY.??????????????.scrollHeight;

Here the commit which deleted the element:

Got it it seems:

@ViewChild('myScrollY') scrollY: Scroll;
this.scrollY._scrollContent.nativeElement.scrollHeight;
1 Like