目前无法延迟Ember中的视野破坏.如果要在销毁视图之前为视图设置动画,则会出现此问题.
所以,我目前有这个非常丑陋的解决方法:
willDestroyElement: ->
  $clone = @$().clone().addClass "animate-destruction"
  @$().parents(':first').prepend $clone
  setTimeout ->
    $clone.off().remove()
  , 350
Run Code Online (Sandbox Code Playgroud)
注意:动画是.animate-destruction在css 中的类中完成的.
我知道我的方法很糟糕,所以我想知道是否有人提出了更好的方法.
ember.js ×1