Skip to content

Instantly share code, notes, and snippets.

@mmun
Created June 6, 2013 21:52
Show Gist options
  • Save mmun/5725302 to your computer and use it in GitHub Desktop.
Save mmun/5725302 to your computer and use it in GitHub Desktop.
Em.View.reopen
connectOutlet: (outletName, view) ->
if @_hasEquivalentView(outletName, view)
oldView = @get "_outlets.#{outletName}"
if $old = oldView.$().clone().addClass('old')
$old.find('script').remove()
oldView.trigger 'beginTransition', $old
@_super(outletName, view)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment