Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@metalmatze
Created May 12, 2015 10:38
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 metalmatze/ce4347a3a44a5520c2f2 to your computer and use it in GitHub Desktop.
Save metalmatze/ce4347a3a44a5520c2f2 to your computer and use it in GitHub Desktop.
Polymer element
<dom-module id="element-name">
<style>
/* CSS rules for your element */
</style>
<template>
<!-- local DOM for your element -->
<div>{{greeting}}</div> <!-- data bindings in local DOM -->
</template>
</dom-module>
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment