firebase-polymer

Polymer 1.x + Firebase 2.x: How to push or put data to Firebase using Polymerfire?

会有一股神秘感。 提交于 2020-02-24 11:33:04
问题 Using Polymerfire, I want to add new nodes to a Firebase without overwriting data. (I call this push or put behavior.) In other words. I want to start with this: State A my-app | - emails | + email1@example,com + email2@example,com And finish with this. State B my-app | - emails | + email1@example,com + email2@example,com + email3@example,com + email4@example,com But when I start with State A and do this: <firebase-document id="doc" app-name="app" data="{{data}}"> </firebase-document> ...

Polymer 1.x: How to reverse order of records returned by <firebase-collection>

天涯浪子 提交于 2020-01-07 05:05:11
问题 How do I reverse the order of records returned by <firebase-collection> as follows: <firebase-collection id="foo" order-by-child="bar"> ? Can I do it declaratively? Or do I need to call an imperative method like maybe... this.$.foo = this.$.foo.reverse(); https://elements.polymer-project.org/elements/firebase-element?active=firebase-collection Note: I'm using <iron-list> and not <template is="dom-repeat"> . 回答1: Simplest is just to use a <dom-repeat> with an inverse sort I believe. sort.

How to view the Polymerfire demo using Polymer’s `polymer serve` polyserve server?

喜欢而已 提交于 2020-01-03 16:25:43
问题 I want to view this demo of Polymerfire in my browser. I expect to see the demo run in my browser. Instead, I see a blank page and the following console error. console.log.error.message GET http://localhost:8080/ 404 (Not Found) Navigated to http://localhost:8080/ I used the following procedure: I installed the Polymer-CLI multi-tool per the instructions found here. I created a project using the Polymer Starter Kit (PSK). I named the project my-app . I installed the Github repo found here

How to view the Polymerfire demo using Polymer’s `polymer serve` polyserve server?

寵の児 提交于 2020-01-03 16:25:11
问题 I want to view this demo of Polymerfire in my browser. I expect to see the demo run in my browser. Instead, I see a blank page and the following console error. console.log.error.message GET http://localhost:8080/ 404 (Not Found) Navigated to http://localhost:8080/ I used the following procedure: I installed the Polymer-CLI multi-tool per the instructions found here. I created a project using the Polymer Starter Kit (PSK). I named the project my-app . I installed the Github repo found here

Authenticate Firebase in Polymer using OAuth token

余生颓废 提交于 2019-12-23 05:01:33
问题 I have a Firebase database that authenticates with a Google account. Currently I have a <google-signin-aware> element that details the app's sign-in details for use with the Google Sign-in API, and upon sign-in authenticates a Firebase reference with the access token returned by the Google sign-in. From the callback for <google-signin-aware> element on successful sign-in: var ref = new Firebase("https://<myapp>.firebaseio.com"); var access_token = gapi.auth2.getAuthInstance().currentUser.get(

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

戏子无情 提交于 2019-12-19 04:22:53
问题 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,

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

▼魔方 西西 提交于 2019-12-19 04:22:26
问题 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,

Polymer 1.x + Firebase == Hello world?

社会主义新天地 提交于 2019-12-12 02:55:41
问题 I want to make Hello, world with the Polymer firebase-collection element. I expect to see one or more repetitions of Hello, world and no errors in the console. Instead, I see no Hello, world and many console errors beginning with: console.log ReferenceError: Firebase is not defined To recreate the problem, follow these steps: Open this jsBin. ❌ Observe no Hello, world and errors in the console. Notice the <firebase-collection> code is simply a copy/paste from the official documentation

What is template-bound in polymer?

江枫思渺然 提交于 2019-12-11 15:25:32
问题 I noticed there is a template-bound in firebase polymer firebase-login.html after searching polymer documentation cannot find out what is that. also, any polymer events reference in documentation? 回答1: This is the event that fires after the data binding happens in a Polymer's auto-binding template . <template id="myTemplate" is="auto-binding"> </template> <script> var template = document.getElementById("myTemplate"); template.addEventListener('template-bound', function() { console.log('ready'

Polymerfire - creating data after an event

橙三吉。 提交于 2019-12-11 13:18:45
问题 I'm using the firebase/polymerfire package from bower bower install firebase/polymerfire how can i create some data in the database after a method has been triggered? The document tag looks like it will display and update data. I would like to, when a user signs up, create some data for the user to use. app.signInAnonymously = function() { this.error = null; this.$.auth.signInAnonymously(); // add default data for the user template }; How can i use the default set() or push methods like the