Question

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.

Was it helpful?

Solution

Solution

$scope.refresh = function () {
    $animate.enabled(false);
    $route.reload();
    $timeout(function () {
        $animate.enabled(true);
    });
};
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top