Last active
August 6, 2017 17:28
-
-
Save enjikaka/1f709beeaecd944073d7384cc96a0d37 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <link rel="import" href="template-component.html"> | |
| <script> | |
| class HelloWorld extends TemplateComponent { | |
| constructor() { | |
| super(HelloWorld.is); | |
| } | |
| static get is() { | |
| return 'hello-world'; | |
| } | |
| getState() { | |
| return { | |
| hello: "world" | |
| }; | |
| } | |
| } | |
| window.customElements.define(HelloWorld.is, HelloWorld); | |
| </script> | |
| <template> | |
| <style> | |
| /* This is scoped! */ | |
| p { | |
| color: blue; | |
| font-weight: bold; | |
| } | |
| </style> | |
| <h1>Welcome!</h1> | |
| <p>Awesome song is ${this.world}</p> | |
| </template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment