0

I'm developing Hybrid app using ionic-3. I want to display vertical line in center of the page and my page have dynamic data so we can't set height of this line. I have display view of my page in below image. I have put div and set as absolute and give border left with 100% height but when i scroll line is no longer. So i just want to calculate height to scroll content and i'll set it dynamically. Let me know if you have better solution for it.

enter image description here Thank you.

Sandip Moradiya
  • 706
  • 1
  • 11
  • 30

2 Answers2

0

Create Viewchild for your element in component

@ViewChild('myScrollY') scrollY: ElementRef;

add #myScrollY to your element

in component u can get it with below code

this.scrollY.nativeElement.scrollHeight;
mr. pc_coder
  • 16,412
  • 3
  • 32
  • 54
0

For this specific issue there are some other ways to solve the issue.

1) You could add a pseudo element and position it absolute in the wrapping container 2) Add a background with a line in it.

Daniel Williams
  • 672
  • 5
  • 8