Can someone please assist me in resolving this issue?
I'm currently working on a div element that displays data (positioned on the left side of the screen). I want to add a scrollbar exclusively to this div. I managed to achieve this by using the following code snippet.
<div style="float: left;
width: 100%;
overflow-y: auto;
max-height: 500px;">
However, the challenge arises when viewing this on screens with different resolutions – particularly larger screens where the data may fit without requiring a scrollbar.
By using
$window.innerHeight
I am able to obtain the height of the screen. My question is, how can I dynamically set this value as the "max-height" for the div element from within the controller?