polymerfire

Polymerfire dom-repeat with Firebase objects

风格不统一 提交于 2019-12-08 05:17:28
I want to be able to show a list of all the FirstName and ZipCodes . My data looks as follows: /user | |__INAxzxWKQrSAfA7tapV0c08YvfJ3 | |____FirstName:"James" | |____ZipCode:"90210" | |__ANAczxWKQrEAfA7tapV0c08YvfX6 |____FirstName:"Simon" |____ZipCode:"40213" and Polymerfire's firebase document looks like this <firebase-document app-name="contacts" path="/user" data="{{allUsers}}"> </firebase-document> And my dom repeat is like <template is="dom-repeat" items="{{_makeArray(allUsers)}}"> <div class="profile card"> {{item.FirstName}} </div> </template> I added the function _makeArray: function

How to insert data into Firebase using Polymerfire (mutiple nodes + multiple paths)

馋奶兔 提交于 2019-12-01 00:46:11
My use case is that I have an <iron-form> with a single <paper-textarea> field that accepts a string list of email addresses which I parse into an array, then I want to: Store the individual email addresses in my Firebase (for indexing and lookup purposes), at multiple locations (per data fan out technique), with a single write operation (because I don't want to make 100 API calls if the list is that long) and without overwriting any existing data. Specifically, I want to start with State A, as follows: State A my-app | - emails | | | - email1@example,com | |- old: "data" | - email2@example

Polymer + Firebase (Polymerfire): <firebase-query> not working inside single page app view (with <firebase-app> located in my-app.html)

我们两清 提交于 2019-11-29 05:14:15
I'm trying to push data to Firebase using Polymerfire and the Polymer App Toolbox template: my-app.html contains a configured <firebase-app> component. my-models.html (which is a page configured in my-app.html routes) contains a <add-model> component <add-model> is a form with a <firebase-query> , <firebase-auth> , input, and submit button. I attempt to push data using <firebase-query> with the following function in the add-model.html Polymer object: Polymer({ is: 'add-model', properties: { data: { type: Object } }, create: function() { this.$.query.ref.push({ name: this.$.myModelName.value })