Copy a template inside a DOM node


License
MIT
Install
npm install carbon-copy@0.1.8

Documentation

Published on webcomponents.org

<carbon-copy>

Copy a template inside a DOM node. ~900B (minified/gzipped).

Syntax:

<template id="beautiful">
    <div>
        <slot name="subjectIs"></slot> beautiful
    </div>
</template>
...
<c-c copy template-id="beautiful">
    <span slot="subjectIs">
        You are
    </span>
</c-c>

Install the Polymer-CLI

First, make sure you have the Polymer CLI and npm (packaged with Node.js) installed. Run npm install to install your element's dependencies, then run polymer serve to serve your element locally.

Viewing Your Element

$ polymer serve

Running Tests

$ polymer test

Your application is already set up to be tested via web-component-tester. Run polymer test to run your application's test suite locally.