Open roelrz opened 7 years ago
@roelrz there is no supported way, you can lobby for this feature and/or submit a PR. Currently you can leak the DOM nodes by this._wormholeHeadNode.parentNode.insertBefore(this._wormholeHeadNode, this._wormholeTailNode)
in willDestroyElement
, or use cloneNode(true)
on the node you want to keep.
According to the docs, if a wormhole is used on a route's template it will render it's children in the destination element when the route is rendered and removed when the route is exited.
With that being said, is there any way to keep the children in the destination element even after the route is exited?
My use case is to update the destination element every time a route changes but to keep the route's children in the destination element until the new route's children are ready to be injected via the wormhole