Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!doctype html>
<head>
  <meta charset="utf-8">
  <!-- Source: https://github.com/Download/polymer-cdn -->
  <base href="https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/lib/">
  <script src="webcomponentsjs/webcomponents-lite.min.js"></script>
  <link rel="import" href="polymerfire/polymerfire.html">
  <link rel="import" href="polymerfire/firebase-query.html">
  <link rel="import" href="polymerfire/firebase-document.html">
  <link rel="import" href="polymerfire/firebase-app.html">
  <link rel="import" href="paper-button/paper-button.html">
</head>
<body>
<dom-module id="x-element">
<template>
  <style></style>
  
  
  <p>
    <paper-button on-tap="_onTap">Click Me</paper-button>
  </p>
  <!---->
    <firebase-app 
     database-url="dinos-89701.firebaseio.com"
     api-key="AIzaSyDLkCy3RNC5uFomEjVsLUehpzKFDrfAplU"
     auth-domain="dinos-89701.firebaseio.com">
    </firebase-app>
  
    <firebase-query id="qry"
      path="/dinosaurs"
      data="{{dinosaurs}}">
    </firebase-query>
    <template is="dom-repeat" items="[[dinosaurs]]">
      <div>[[item.order]]</div>
    </template>
  <!---->
</template>
<script>
  (function(){
    Polymer({
      is: "x-element",
      properties: {
        dinosaurs: {
          value: function() {
            return [];
          }
        },
      },
      _onTap: function() {
        console.log('You clicked me!');
        console.log('triceratops', JSON.stringify(this.dinosaurs));
      }
    });
  })();
</script>
 
</dom-module>
<x-element></x-element>
</body>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
JaySunSynpro
0viewers