希望每个人都很好,我有一个角度Js的问题,我写了一个函数,根据其他div高度更新一个div的高度,因为一个div高度根据内容调整而其他div包含一些内容更改高度,这是其他div高度,功能是,问题是它第一次以良好的方式运行,但之后它给出了错误的高度。
$scope.changeheight=function(){
//document.getElementById("product").style.height='720px';
//document.getElementById("buyproduct").style.height='720px';
angular.element('.buyproduct').css('height', 'auto');
angular.element('.buyproduct').css('padding-bottom','55px');
var element = angular.element(document.querySelector('.buyproduct'));
var height = element[0].clientHeight;
angular.element('.product').css('height', height);
}</i>