0

Why alert div is not fading out. It's disappearing immediately without any animation

<div ng-show="error!=null && error.key!='undefined' && error.key==0" 
     ng-animate="'fade'" class="alert alert-success alert-dismissable">
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
    <strong>{{error.value}}</strong>
</div>

$timeout(function () {
                        $scope.error = null;
                    }, 2000);
Shantanu Gupta
  • 20,688
  • 54
  • 182
  • 286

1 Answers1

0

I can't make comments with this account but just an FWI, use !== instead of != and === instead of ==

Colo Ghidini
  • 658
  • 9
  • 20