1
當DOM Load完成時,我想要測量AngularJS中DOM元素的高度。計算AngularJS中DOM的動態高度
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());
})
})
}
}
}])