Last active
August 29, 2015 14:09
-
-
Save caseylmanus/7ce0e8058a3f1f0219a6 to your computer and use it in GitHub Desktop.
Polymer Element Template
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
<html> | |
<head> | |
</head> | |
<body> | |
</body> | |
</html> |
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
<!-- import polymer --> | |
<link href="bower_components/polymer/polymer.html" rel="import"> | |
<!-- import any other elements you will reference --> | |
<link href="bower_components/paper-button/paper-button.html" rel="import"> | |
<polymer-element name="hello-world"> | |
<template> | |
<style> | |
/* any style specific to this shadow dom, remember styles are isolated | |
and will not be inherited or interfere with this sandbox, you may include | |
any css file */ | |
</style> | |
<div> | |
<template if="{{showbutton}}"> | |
<paper-button raised on-click="{{start}}">Say Hello</paper-button> | |
</template> | |
<template if="{{!showbutton}}"> | |
Hello World! | |
</template> | |
</div> | |
</template> | |
<script> | |
Polymer('hello-world', { | |
showbutton: true, | |
start: function(){ | |
this.showbutton = false; | |
} | |
}); | |
</script> | |
</polymer-element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment