You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
roelrz
changed the title
Keep Children in Destination Element
Keeping Children in Destination Element
Jun 5, 2017
roelrz
changed the title
Keeping Children in Destination Element
Keeping children in destination element
Jun 5, 2017
@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
The text was updated successfully, but these errors were encountered: