To give an alternative to the solution mixin, here is another way to share your markup with your logic.
Plunker ( ). , . <script>todoTag.call(this, this.opts);</script>. todoTag . , .
:
todo.tag.html:
<todo>
<script>todoTag.call(this, this.opts);</script>
</todo>
todo.tag.js:
function todoTag(opts) {
}