feat(templates): add data access explanation

This commit is contained in:
Ayo 2023-10-22 00:25:26 +02:00
parent 7f6cf37224
commit 38596b1152

View file

@ -13,6 +13,11 @@ class HelloWorld extends WebComponent {
}
get template() {
/**
* any attribute/property in kebab-case...
* can be accessed via its camelCase counterpart
* example: data-name prop is accessible as this.dataName
*/
return `<button style="cursor:pointer">Hello ${this.dataName}!</button>`;
}
}