Search Posts

Category: angularfire2

Push firebase uid to multiple locations – Angularfire2 Ionic 3

I have the following which simply pushes a name into the database along with a uid. I would like to store that uid in another location at the same time. How can I achieve this? Im using ionic 3, angularfire2. addName() { let prompt = this.alertCtrl.create({ title: ‘Name of user’, message: “Enter a name for this new user”, inputs: [ { name: ‘Name’, placeholder: ‘Username’ }, ], buttons: [ { text: ‘Cancel’, handler: data => […]

angularjs: Error: Firebase Database (4.3.1) INTERNAL ASSERT FAILED: Missing index implementation for isEmpty

I try to read some data from firebase, but my logic doesn’t work.. the problem seems to occur when I create a database ref. my lib version: AngularJS v1.6.5 AngularFire v2.3.0 Firebase v4.3.1 My firebase db: { “post” : [ null, { “message” : “hi”, “name” : “Mario Rossi” }, { “message” : “hi”, “name” : “Alessia Gallina” }, { “message” : “hi”, “name” : “Stefano Macchi” }, { “message” : “hi”, “name” : “Roberto […]

INTERNAL ASSERT FAILED: Missing index implementation for isEmpty

I try to read some data from firebase, but my logic doesn’t work.. the problem seems to occur when it tries to read the database. my lib version: AngularJS v1.6.5 AngularFire v2.3.0 Firebase v4.3.1 My firebase db: { “post” : [ null, { “message” : “hi”, “name” : “Mario Rossi” }, { “message” : “hi”, “name” : “Alessia Gallina” }, { “message” : “hi”, “name” : “Stefano Macchi” }, { “message” : “hi”, “name” : […]

Authentication angularfire2 and Routes

I’m a beginner angular programmer, I’m doing an app with authentication with social network (Facebook & Google). in the logincomponent.ts indicates me an error, at the part “signInWithFacebook() “this.firebaseAuth.signInWithFacebook()” Property ‘signInWithFacebook’ does not exist on type ‘AngularFireAuth’. and the “this.router.navigate([‘dashboard’])” Property ‘router’ does not exist on type ‘AuthService’.any. I show the codes for if anybody helps me. Thanks for your comments. auth.service.ts import { Injectable } from ‘@angular/core’; import { Router } from ‘@angular/router’; import […]

Firebase Angular nested tree view

I have a dataset that looks like this inside of Firebase. Its basically a hierchical view of categories: In my angular app, my template looks like this: <ul> <li class=”text” *ngFor=”let item of items | async”> <input [(ngModel)]=”item.name”> <button (click)=”updateItemFromList(item.$key, item.name)”>Update</button> <button (click)=”removeItemFromList(item.$key)”>Delete</button> <button (click)=”addChildCategory2(item.$key, item)”>Add Child Category</button> <ul> <li *ngFor=”let childCategory of item.children”> <input [(ngModel)]=”childCategory.name”> </li> </ul> ….. Here is how I’m loading items: export class AppComponent { title = ‘My App’; db: any; […]

Match Fetched Data from 2 different References

My Json Object: “order” : [ $key1 { “state”: ‘active’, “name”: ‘Order#55’ }, $key2 { “state”: ‘active’, “name”: ‘Order#56′ } ] “products”: [ $key1{[ $productkey1{name:’Item’ desc: ‘description’ }, $productkey2{name:’Item’ desc: ‘description’ } }], “key2″[] ……. ]} My Html View I want to have an Html file like this picture. So: FirebaseListObservable<Order[]> FirebaseListObservable<Product[]> Each card will have the order and inside a list from the order’s products. My wrong code that fetches the data! Ref$: FirebaseListObservable<any[]>; […]