我有一个刷新按钮,它调用作用域函数$route.reload
来模拟 View 上的刷新。但问题是,当我单击它时,它会在我的 ng-view 上触发我的 ng-animate ,这使得它看起来非常困惑。无论如何,这附近有吗?
Controller
$scope.refresh = function () {
$route.reload();
};
索引 ng-view
<div ng-view class="slide"></div>
我最终弄清楚了,请在下面查看我的答案。
最佳答案
解决方案
$scope.refresh = function () {
$animate.enabled(false);
$route.reload();
$timeout(function () {
$animate.enabled(true);
});
};
关于javascript - $route.reload 和 ngAnimate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21947787/