Ng-show does not work correctly with ng animation

When the animation module is loaded, ng-show does not work. The default value for the ng-show expression is false, but the item is still displayed and the ng-hide class is missing. If I unload the animation module, then it works fine.

<script>
var app=angular.module('app', ['ngRoute','ngCookies','infinite-scroll','ui.mask','ngAnimate']);
</script>
+4
source share
2 answers

, , , , . , , "class" , , . class="{{::item.customClass}}" , ng-class ng-show .

plunker, , - . $templateCache, ngAnimate , ng-repeat ng-show ( , , , ). . , ui-view, , ui-router .

, , ng-class/ng-show , , : class="{{::item.customClass}} ng-hide", : class="myCustomClass". , .

, item.customClass ng- : ng-class=[{ ... other classes}, item.customClass]

, , :

  • , , Angular.
  • , bind , , .
+1

animate.css. Angular, class= 'ng-show'.

:

<div class="animated fadeInRight" data-ng-class="loginShow">

$scope.loginShow "ng-show" , .

"ng-hide", :

$scope.loginShow = 'ng-hide-add animated fadeOutRight';

, !

+1

Source: https://habr.com/ru/post/1624919/


All Articles