Skip to content

child is not cleaned up if dynamic component changes before its wait-for event is triggered #1152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nkovacs opened this issue Aug 12, 2015 · 1 comment

Comments

@nkovacs
Copy link

nkovacs commented Aug 12, 2015

http://jsfiddle.net/nkovacs/djq02tkt/

Click "Page 1", wait for the component to appear, then click "Page 2".
Click "Log $children". You should only see [Page2] in the console.

Click "Page 1", then immediately click "Page 2", before page1 loads.
Click "Log $children". You'll see [Page1, Page2] in the console. Page1 is stuck forever in the parent's $children array.

@nkovacs
Copy link
Author

nkovacs commented Aug 12, 2015

This is supposed to destroy the previous child, this.childVM, but since the wait-for event has not happened yet, this.childVM has not been set yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant