Created
August 6, 2017 17:24
-
-
Save enjikaka/923e79fc8ddf280dabdb2d2dfddcbfa8 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 HomePage extends TemplateComponent { | |
| constructor() { | |
| super(HomePage.is); | |
| } | |
| static get is() { | |
| return 'hello-world'; | |
| } | |
| async getState() { | |
| return await fetch('https://api.saoirse.audio/track/tidal/66522953') | |
| .then(res => res.json()); | |
| } | |
| } | |
| window.customElements.define(HomePage.is, HomePage); | |
| </script> | |
| <template> | |
| <style> | |
| /* This is scoped! */ | |
| p { | |
| color: blue; | |
| font-weight: bold; | |
| } | |
| </style> | |
| <h1>Welcome!</h1> | |
| <p>Awesome song is ${this.tidal_id}</p> | |
| </template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment