AngularJS animation card flip

后端 未结 2 800
清酒与你
清酒与你 2021-02-07 14:33

I am trying to use the new AngularJS way of doing animations between page transitions and would like to incorporate a card flip (like http://jsfiddle.net/nicooprat/GDdtS/)

2条回答
  •  情话喂你
    2021-02-07 14:53

    I realize this was a long time ago, but I was just doing this, and it took zero javascript. The key is ng-class. Here is a JSFIDDLE.

    The key is this line

    It will assign the class 'flipped' to the card when $scope.isFlipped is true. Here is a little NFL flash cards game I put together for fun. Check out the source code (which isn't super pretty), it should be helpful if you are doing something like this.

    NFL Flash Cards

提交回复
热议问题