Skip to content

Instantly share code, notes, and snippets.

@nbortolotti
Created November 9, 2015 15:33
Show Gist options
  • Save nbortolotti/02e065f335138a1072d8 to your computer and use it in GitHub Desktop.
Save nbortolotti/02e065f335138a1072d8 to your computer and use it in GitHub Desktop.
modulo de accesos firebase desde polymer
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/firebase-element/firebase-collection.html">
<link rel="import" href="../../bower_components/firebase-element/firebase-document.html">
<dom-module id="app-comercios">
<template>
<div class="vertical-section">
<h3>Comercios Destacados</h3>
<template is="dom-bind">
<firebase-collection
order-by-child="ganancia"
location="https://polymernickdemo.firebaseio.com/comercios"
data="{{comercios}}"></firebase-collection>
<template is="dom-repeat" items="[[comercios]]" as="comercio">
<h4>[[comercio.__firebaseKey__]]</h4>
<span>Ganancia: </span><span>$ </span><span>[[comercio.ganancia]]</span>
</template>
</template>
</div>
</template>
<script>
(function() {
'use strict';
Polymer({
is: 'app-comercios',
properties: {
}
});
})();
</script>
</dom-module>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment