Fork me on GitHub

<imported-template>

<imported-template> is a custom element that lets you load template from external file into your document, and take full control over loaded <script>s and <link rel="import">s. Thanks to HTML Imports - caching, script execution, etc. are completely native. It also provides a simple data-binding feature, that plays nice with Polymer or pure JavaScript + HTML data-binding. It simply imports (according to HTML Imports) given file, and stamp template from it into current document. See README.md for more information

Examples

<imported-template> features

Well behaved partial rules

In other words: use anything that valid HTML document may use, and prepare at least one <template> to be stamped.

Misbehaved partials

If you partial missbehaves, and you would like to isolate its content more consider iframe (<template is="juicy-iframe">)

.

Otherwise it may blow up, as entire content will be loaded once as a HTML Import, and then replicated (re-executed) to original document every time.