Skip to content

Instantly share code, notes, and snippets.

@caseylmanus
Last active August 29, 2015 14:09
Show Gist options
  • Save caseylmanus/7ce0e8058a3f1f0219a6 to your computer and use it in GitHub Desktop.
Save caseylmanus/7ce0e8058a3f1f0219a6 to your computer and use it in GitHub Desktop.
Polymer Element Template
<html>
<head>
</head>
<body>
</body>
</html>
<!-- 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