Ember.js Router: How to animate state transitions

后端 未结 6 645
情歌与酒
情歌与酒 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 22:51

    App.SomeView = Ember.View.extend({
      didInsertElement: function(){
       //called on creation
       this.$().hide().fadeIn(400);
      },
      willDestroyElement: function(){
       //called on destruction
       this.$().slideDown(250)
      }
    });
    

提交回复
热议问题