calculate Dynamicaly height of DOM in AngularJS -


i want measure height of dom element in angularjs when dom load complete.

myapp.directive('domheight',['$timeout',function($timeout){    return{      restrict:'ea',      scope:true,      link:function(scope,element,attrs){           $(document).ready(function(){              $('.required-wrapper').load(function(){                console.log( $('.required-wrapper').height());              })                        })      }    }  }])
**above code trigger height before dom load **

i try use $timeout this

not tested

    $('.required-wrapper').load(function(){       $timeout(function() {         //as far know there no event notify loaded dom has rendered         //so use timeout instead         console.log( $('.required-wrapper').height());       }, 100);       }) 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -