-
-
Save marcus7777/9b21bbd3720da780c32d to your computer and use it in GitHub Desktop.
// source http://jsbin.com/lokegu
This file contains hidden or 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> | |
<meta charset="utf-8"> | |
<base href="http://golowan.org/stuff/bower_components/"> | |
<script href="webcomponentsjs/webcomponents-lite.js"></script> | |
<link rel="import" href="firebase-element/firebase-document.html"> | |
<link rel="import" href="firebase-element/firebase-collection.html"> | |
</head> | |
<body> | |
<template is="dom-bind" id="app"> | |
<put-data></put-data> | |
</template> | |
<dom-module id="put-data"> | |
<template> | |
<firebase-document data="{{a}}" | |
location="https://positions.firebaseio-demo.com"> | |
</firebase-document> | |
<span>{{put('1','One')}}</span><br /> | |
Here it is <span>[[a.1]]</span> | |
<br /> | |
<span>{{put('2','Two')}}</span><br /> | |
Here it is <span>[[a.2]]</span> | |
</template> | |
</dom-module> | |
<script> | |
(function () { | |
Polymer({ | |
is: 'put-data', | |
put: function(key, data) { | |
var putting = {}; | |
putting[key] = data; | |
this.aa = putting; | |
return "Putting data " + data + " in " + key; | |
} | |
}); | |
})(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment