ember.js
ember.js copied to clipboard
Sibling outlet not cleared on exit
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.
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
Thanks trek, precise answer.