Last active
August 29, 2015 14:03
-
-
Save edsilv/cd830dc3cbf20df97ab1 to your computer and use it in GitHub Desktop.
designer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-counter" attributes="counter"> | |
<template> | |
<style> | |
</style> | |
<div id="label"> | |
<content></content> | |
</div> | |
<span id="counterVal">{{ counter }}</span> | |
<br></br> | |
<button id="button" on-tap="{{ increment }}">Increment</button> | |
</template> | |
<script> | |
Polymer('my-counter', { | |
counter: 0, | |
counterChanged: function () { | |
this.$.counterVal.classList.add('highlight'); | |
}, | |
increment: function () { | |
this.counter++; | |
} | |
}); | |
</script> | |
</polymer-element> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-counter" attributes="counter"> | |
<template> | |
<style> | |
</style> | |
<div id="label"> | |
<content></content> | |
</div> | |
<span id="counterVal">{{ counter }}</span> | |
<br/> | |
<button id="button" on-tap="{{ increment }}">Increment</button> | |
</template> | |
<script> | |
Polymer('my-counter', { | |
counter: 0, | |
counterChanged: function () { | |
this.$.counterVal.classList.add('highlight'); | |
}, | |
increment: function () { | |
this.counter++; | |
} | |
}); | |
</script> | |
</polymer-element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment