mirror of
https://github.com/jlengrand/web-components-workshop-polymer.git
synced 2026-03-10 08:51:20 +00:00
Step 2 : Adding properties
This commit is contained in:
@@ -9,13 +9,22 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<h2>Hello Meetup!</h2>
|
||||
<h2>Hello [[name]]!</h2>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
class HelloWorldElement extends Polymer.Element {
|
||||
static get is() { return 'hello-world' }
|
||||
static get properties() {
|
||||
return {
|
||||
name: {
|
||||
type: String,
|
||||
value: 'Meetup',
|
||||
reflectToAttribute: true
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
customElements.define(HelloWorldElement.is, HelloWorldElement);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user