Skip to content

Instantly share code, notes, and snippets.

@kikill95
Last active November 6, 2015 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kikill95/1b14cd2792961977c09d to your computer and use it in GitHub Desktop.
Save kikill95/1b14cd2792961977c09d to your computer and use it in GitHub Desktop.
Kirill G. - little dive into Polymer
<dom-module id="element-name">
<template>
<style>
/* CSS rules for your element */
</style>
<!-- local DOM for your element -->
<div>{{greeting}}</div> <!-- data bindings in local DOM -->
</template>
<script>
// element registration
Polymer({
is: "element-name",
// add properties and methods on the element's prototype
properties: {
// declare properties for the element's public API
greeting: {
type: String,
value: "Hello!"
}
}
});
</script>
</dom-module>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment