문제

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