Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #set($CLASS_NAME = "")
- #set($part = "")
- #if($NAME.endsWith(".js"))
- #set($end = $NAME.length() - 3)
- #set($NAME = "$NAME.substring(0,$end)")
- #end
- #foreach($part in $NAME.split("-"))
- #set($CLASS_NAME = "${CLASS_NAME}$part.substring(0,1).toUpperCase()$part.substring(1).toLowerCase()")
- #end
- import { PolymerElement, html } from '/node_modules/@polymer/polymer/polymer-element.js';
- class ${CLASS_NAME} extends PolymerElement {
- static get template() {
- return html`
- <style>
- :host {
- display: block;
- }
- </style>
- <div>Hola mundo! Polymer 3</div>
- `;
- }
- static get properties() {
- return {};
- }
- }
- window.customElements.define('${NAME}', ${CLASS_NAME});
Add Comment
Please, Sign In to add comment