angularfire

Limiting the firebase equalTo query with the optional key parameter

こ雲淡風輕ζ 提交于 2019-12-24 07:28:11
问题 I have a feeling I may have the understanding of this feature wrong coming from the SQL background. The documentation is sparse and I haven't been able to find a good example or an explanation. I am looking for a clarification to the following from https://github.com/angular/angularfire2/blob/master/docs/4-querying-lists.md: 1 The Firebase SDK supports an optional key parameter for startAt, endAt, and equalTo when ordering by child, value, or priority. You can specify the key parameter using

Get Observable references from many to may middle foreign collection

北城余情 提交于 2019-12-24 07:27:31
问题 I have a many to many relationship: [persons]x------1[personsPets]1------x[pets] [persons] id name [pets] id name [personsPets] id personId petId Using @angular/fire and rxjs 6, I want a service to get the persons array with their pets each, like that: this.personService.getPersons().subscribe(persons => { const firstPersonPetNames: string[] = persons[0].pets.map(pet => pet.name) const secondPersonPetNames: string[] = persons[1].pets.map(pet => pet.name) console.log(firstPersonPetNames) // [

Firebase Angular OAuth with Google email scope, auth.$authWithOAuthPopup vs ref.authWithOAuthPopup

不想你离开。 提交于 2019-12-24 07:20:00
问题 I'm successfully using Firebase's angular library to auth users against Facebook and Google, but I'm having troubling retrieving the user's email when using firebaseAuth's $authWithOAuthPopup. Here's my login function. var ref = new Firebase(FIREBASE_URL); var auth = $firebaseAuth(ref); loginGoogle: function () { console.log('Logging in Google.'); return auth.$authWithOAuthPopup('google', function(error, user){ //TODO: Handle Failed login better console.log('Google login failed'); console.log

Firebase 3 get list which contain generated keys to ionic list

最后都变了- 提交于 2019-12-24 07:05:39
问题 I wanna synchronize firebase table with ionic list. These are items on database Items -KQpA9YpXyqBQ2HZedEo name: "jhj" -KQpAWtIaMeS93431BRQ name: "hj" -KQpB6grRt15GnacKHjW name: "j" This is ionic part <ion-list> <ion-item ng-repeat="item in items"> <h2>{{item.name}}</h2> </ion-item> </ion-list> Here is my firebase part var itemsRef = firebase.database().ref('Items'); //first try var items = itemsRef.orderByChild('name'); $scope.items = items; //this is second try itemsRef.on('child_added',

How to create 3 way data binding between angularFire 0.5.0 and latest ng-grid?

与世无争的帅哥 提交于 2019-12-24 05:40:10
问题 angularFire $bind method can be found here : http://angularfire.com/flatdoc.html and latest ng-grid can be found here : http://angular-ui.github.io/ng-grid/ I tried the simplest possible solution but it didnt work : $scope.myData = [{name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}]; $scope.gridOptions = { data: 'myData', rowTemplate:'<div ng-style="{\'cursor\': row.cursor, \'z-index\': col.zIndex(), \'color\': \

Unable to get my data from $firebaseObject using AngularFire in a controller. View/ng-repeat works fine

南笙酒味 提交于 2019-12-24 05:04:15
问题 I have different sections in Firebase with normalized data, and I have routines to get the information, but I cannot loop through the returned records to get data. I want to use the keys in the $firebaseArray() to get data from other $firebaseObject(). GetOneTeam() .... { var DataRef = GetFireBaseObject.DataURL(Node + '/'); // xxx.firebaseio.com/Schedules/ var OneRecordRef = DataRef.child(Key); // Schedule Key - 1 return $firebaseObject(OneRecordRef); } ... var Sched = GetOneSchedule(

Simple firebase v3 data retrieval with angularfire v2

北战南征 提交于 2019-12-24 01:55:18
问题 Just started using firebase v3 (released roughly two weeks ago) with angularfire v2 (which according to this post fully supports firebase v3). But I am struggling to simply retrieve some data into an angular view. Here is the controller that simply returns user array and bind it to the view. It breaks on the line using $firebaseArray and says: TypeError: Object expected I am using AngularJs 1.5.6. Just to show the versions of firebase and angularfire I am using: <script src="https://cdn

AngularFire doesn't detect changes if persistence is enabled

随声附和 提交于 2019-12-24 01:24:56
问题 I'm using AngularFire and have the persistence for offline support enabled in my app.module.ts : imports: [ AngularFireModule.initializeApp(environment.firebase), AngularFirestoreModule.enablePersistence() ] When my application start, I retrieve the user using valueChanges() like the following: const doc: AngularFirestoreDocument<User> = this.myCollection.doc<User>(userId); doc.valueChanges().pipe(take(1)).subscribe((user: User) => { console.log(user); }, (err) => { console.err(err); });

Firebase 3, AngularFire 2 in Ionic app data not updating real time / live update (with Video demo)

余生长醉 提交于 2019-12-24 00:57:55
问题 Firebase is known for its real-time data update, so this is a weird one for me. I am using Firebase 3 (New firebase console app. Want to add authentication later) and AngularFire 2. I started the app using Ionic's tab template so the app.js' router config should be the same. Click here to see a (90 second) video demo of the issue I have my ionic app served to the browser using 'ionic serve --lab' so I can see iOS and Android view. When I try to toggle data in one view (say iOS), the changes

AngularFire2 initializing app gives error

半世苍凉 提交于 2019-12-24 00:39:46
问题 I am trying to initialize AngularFire2 in my Angular2 application, but I am getting the following error. ERROR in ./src/app/firebase/index.ts Module build failed: Error: /Users/jaruesink/Documents/Projects/buckets/src/app/firebase/index.ts (16,17): Return type of exported function has or is using name 'ModuleWithProviders' from external module "/Users/jaruesink/Documents/Projects/buckets/node_modules/@angular/core/src/metadata/ng_module" but cannot be named.) at _checkDiagnostics (/Users