Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Get the height of a div without Jquery

$
0
0

Hi,

I am trying to dynamically set the height for my slides (those being of different height, very common problem...)

I want to dynamically set the height of using:

on-slide-changed="slideHasChanged($index)"

However, I cannot find a single solution that works on the net and this forum to get the height of a div without using jquery.

Even the "pure javascript" way (document.getElementById("div").offsetHeight;) won't work.

I tried:

angular.element(document.querySelector('div')).offsetHeight; 
angular.element(document.querySelector('div')).height;

=> without success

Can anyone help me?
Thanks


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>