How to use ng-animate in angular 1.2?

前端 未结 2 1025
广开言路
广开言路 2020-12-16 11:28

Base

angular 1.1.5 - http://plnkr.co/edit/eoKt8o4MJw9sWdYdeG3s?p=preview - WORKS

Upped

angular 1.2.6 - http://plnkr.co/edit/WopgAtFNVm1mKf5Li99h?p=p

2条回答
  •  佛祖请我去吃肉
    2020-12-16 12:16

    I've found this demo that does a great job: http://jsbin.com/usaruce/3/edit

    It uses following syntax:

    .todo-item {
      -webkit-transition: color 0.6s, background-color 0.3s;
      -moz-transition: color 0.6s, background-color 0.3s;
      -ms-transition: color 0.6s, background-color 0.3s;
      transition: color 0.6s, background-color 0.3s;
    }
    .todo-item.ng-enter {
      -webkit-animation: fadeInLeft 1s;
      -moz-animation: fadeInLeft 1s;
      -ms-animation: fadeInLeft 1s;
      animation: fadeInLeft 1s;
    }
    .todo-item.ng-leave {
      -webkit-animation: bounceOut 1s;
      -moz-animation: bounceOut 1s;
      -ms-animation: bounceOut 1s;
      animation: bounceOut 1s;
    }
    

    It also takes advantage of animate.css (fadeInLeft, bounceOut)

提交回复
热议问题