Skip to content

Instantly share code, notes, and snippets.

@marcus7777
Forked from anonymous/index.html
Last active August 29, 2015 14:27
Show Gist options
  • Save marcus7777/9b21bbd3720da780c32d to your computer and use it in GitHub Desktop.
Save marcus7777/9b21bbd3720da780c32d to your computer and use it in GitHub Desktop.
<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