5
我有以下问题,我需要一些关于它可能的原因/解决方案的意见。用户界面更新延迟的数据 - ng-repeat(ngAnimate issue)
我有一个表,其包含体NG-重复
<tr data-ng-repeat="product in shoppingCart"> ... </tr>
每行删除按钮:
<td class="total"><i data-ng-click="removeProduct(product, $index)" class="icon-remove-circle"> </i></td>
和功能:
removeProduct: function (removedProduct, index) {
var _this = this;
_this.$scope.shoppingCart.splice(index, 1);
// + DELETE API Request
},
的问题在于,即使我不等待API请求响应,并且模型中的数据立即更新(l engChart和shoppingCart对象的内容),所发生的变化显着延迟,并且不会立即发生。
编辑:我只是想通过从项目中删除角动画(ngAnimate),问题得到解决。问题是我在项目中使用了角动画,我无法删除它。
最后我用了这里的修复https://gist.github.com/FGRibreau/9504619 – IceWhisper