Created
October 2, 2015 21:49
-
-
Save JanMiksovsky/ef59c30222b5d5fc06b5 to your computer and use it in GitHub Desktop.
Create a Polymer element using a real <template>, not a <dom-module>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="import" href="../components/polymer/polymer.html"> | |
<template id="test-element"> | |
Hello, <content></content>. | |
</template> | |
</head> | |
<body> | |
<test-element>world</test-element> | |
<script> | |
Polymer({ | |
is: 'test-element', | |
_template: document.querySelector('#test-element') | |
}); | |
</script> | |
</body> | |
</html> |
Would it be worth it to create an issue for this, or somehow bring it up with the team?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is great! I wish I could add an '_template' value that is a es2015 template string as well. Thanks for sharing this