Last active
April 24, 2016 08:15
-
-
Save nicholaswmin/48345a31e9254a78ece039ae71086d8d to your computer and use it in GitHub Desktop.
Polymer element using ES6
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
<base href="https://polygit.org/components/"> | |
<script src="webcomponentsjs/webcomponents-lite.min.js"></script> | |
<link href="polymer/polymer.html" rel="import"> | |
<link href="paper-input/paper-input.html" rel="import"> | |
<dom-module id="x-example"> | |
<template> | |
<paper-input value="{{name::input}}"></paper-input> | |
<h4>{{name}}</h4> | |
</template> | |
<script> | |
"use strict"; | |
class xExample { | |
beforeRegister() { | |
this.is = "x-example"; | |
this.properties = { | |
name: { | |
type: String, | |
value: "I'm a data-binded prop" | |
} | |
} | |
} | |
ready() { | |
console.log("ready"); | |
} | |
} | |
Polymer(xExample); | |
</script> | |
</dom-module> | |
<x-example></x-example> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JSFiddle for the above