Frage

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.

War es hilfreich?

Lösung

Solution

$scope.refresh = function () {
    $animate.enabled(false);
    $route.reload();
    $timeout(function () {
        $animate.enabled(true);
    });
};
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top