Ember.js Router: How to animate state transitions

后端 未结 6 685
情歌与酒
情歌与酒 2020-12-29 22:22

Has somebody found a good way to animate state transitions?

The router immediately removes the view from the DOM. The problem with that is that I can\'t defer that u

6条回答
  •  余生分开走
    2020-12-29 23:02

    I know this is pretty old, but the best solution for this context-specific animation today is probably ember liquid fire.

    It allows you to do things like this in a transition file:

    export default function(){
      this.transition(
        this.fromRoute('people.index'),
        this.toRoute('people.detail'),
        this.use('toLeft'),
        this.reverse('toRight')
      );
    };
    

提交回复
热议问题