ionic-views
ionic-views copied to clipboard
Switching views in the render method triggers an unmounted render
If you have views A and B, where A has two subviews (C and D), if subview C's onRender method calls Application.switchTo, views A, C and D will be unmounted and view B rendered, but then immediately afterwards subview D's render method will be called (which if it expects view state to be in place from mounting, will blow up).
One potential fix might be to switch states using setImmediate to ensure the current call chain completes first.