<link rel="import" href="bower_components/polymer/polymer.html">
<dom-module id="my-element">
<template>
<style>
div {
property: value;
}
</style>
<div>
<p>{{ name }}, I'm your father.</p>
<content></content>
</div>
</template>
<script>
Polymer({
is: "my-element",
ready: function() {
this.name = "Luke"
}
properties: {
// Property available through DOM attribute
name: {
type: String,
value: "Luke"
}
}
});
</script>
</dom-module>
Basic code to register a polymer web component.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.