ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

Sibling outlet not cleared on exit

Open jsolano opened this issue 13 years ago • 2 comments

Demonstration : http://jsfiddle.net/jsolano/7CH5E/

We are controlling bootstrap modal's state using the router. When the outlet is connected, the modal is showed correctly, but when switching between sibling states, the view's willDestroyElement doesn't act as expected. Only when connect a new outlet, the willDestroyElement is called.

jsolano avatar Dec 14 '12 20:12 jsolano

If you won't be filling an specific outlet when entering a new state, you should use disconnectOutlet on the previous state's exit event: https://github.com/emberjs/ember.js/blob/master/packages/ember-views/lib/system/controller.js#L198-L208

trek avatar Dec 15 '12 03:12 trek

Thanks trek, precise answer.

jsolano avatar Dec 17 '12 14:12 jsolano