3 ms·
Hi Daniel! Thanks for the great summary on your website. That said I'd love a few more examples - like _how_ to * import a navbar from one html snippet into a
by nikodunk 5y ago
Hi Daniel! Thanks for the great summary on your website.
That said I'd love a few more examples - like _how_ to
* import a navbar from one html snippet into another (thereby making some static site use cases obsolete).
* how to import from CDNs (it took me a while too realize what you were talking about for the case below).
Love your position - but I'd argue your position would be a lot stronger with examples!
Thanks,
Niko
<!DOCTYPE html>
<head>
<script type="module">
import {LitElement, html} from 'https://jspm.dev/lit-element@2';
class MyFooter extends LitElement {
render(){
return html`<footer><p>© ${new Date().getFullYear()} My Company</p></footer>`
}
}
customElements.define('my-footer', MyFooter);
</script>
</head>
<body>
<my-footer name="World"></my-footer>
</body>