I have a refresh button that calls a scope function $route.reload to simulate a refresh on my view. But the problem is when I click it, it is firing off my ng-animate on my ng-view which makes it look really messy. Is there anyway around this?

Controller

    $scope.refresh = function () {
          $route.reload();
    };

Index ng-view

 <div ng-view class="slide"></div>

I ended up figuring it out, check my answer below.

有帮助吗?

解决方案

Solution

$scope.refresh = function () {
    $animate.enabled(false);
    $route.reload();
    $timeout(function () {
        $animate.enabled(true);
    });
};
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top