Skip to content

Instantly share code, notes, and snippets.

Created August 10, 2015 12:58
Show Gist options
  • Select an option

  • Save anonymous/f935c1baf72a724ce6ea to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/f935c1baf72a724ce6ea to your computer and use it in GitHub Desktop.

Revisions

  1. @invalid-email-address Anonymous created this gist Aug 10, 2015.
    46 changes: 46 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    <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>