Last active
August 29, 2015 14:08
-
-
Save mpruessmeier/ce8fa8f0c2cea53a03cf 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="../polymer/polymer.html"> | |
<polymer-element attributes="counter" name="my-counter"> | |
<template> | |
<style> | |
</style> | |
<div id="label"> | |
<content></content> | |
</div> | |
<span id="counterVal">{{ counter }}</span> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<br></br> | |
<button type="submit" willvalidate id="button" on-tap="{{ increment }}">Increment</button> | |
</template> | |
<script> | |
Polymer({ | |
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