#82 Wormhole

You might need your component to render its component somewhere else in the DOM and in that case, you can use the ember addon ember-wormhole.

Why would you ever need that?  One case that comes to mind is rendering modal windows or notifications or other elements that you might want rendered somewhere else on your page.

Here is an example DOM:

and a template:

That will render “Hello world!” inside the div with id “destination”.  You can also pass an element directly instead of the id.

See more examples and options on the github page.

Also published on Medium.

Published by

Emad Ibrahim

Author of asp .net MVC & TDD, entrepreneur, passionate technologist, programmer and productivity nut. more at http://t.co/oSJXPvzu