Im从我的角度控制器(使用ajax)填充我的页面,并使用ng-show在某些步骤中显示内容。 问题是我需要在ng-show显示元素后调整背景的高度。我怎么做?角度,做ng显示后的东西
控制器的功能看起来像这样
$scope.showProducts = function() {
$http({ method: 'GET', url: 'myUrl' }).
success(function(data) {
$scope.productVisible = true;
$scope.products= data;
//here i would like to recalculate the height of the document but it hasn't shown the products yet
});
};
这样的HTML:
<li ng-repeat="product in products" ng-show="productVisible">
{{product.ProductName}}
</li>
谢谢,但它仍然没有触发ng显示 – WIRN