Ich erhalte "Fehler: InvalidPipeArgument: '[Objekt Objekt]' für Pipe 'AsyncPipe'", wenn der folgende Code ausgeführt wird.FirebaseList - Zugriff auf Parsing-Daten, die von Firebase abgerufen wurden, nicht möglich
HTML-Vorlage:
<ion-list>
<ion-item-sliding *ngFor="let item of shoppingItems | async">
<ion-item>
{{ item.$value }}
</ion-item>
<ion-item-options side="right">
<button ion-button color="danger" icon-only (click)="removeItem(item.$key)"><ion-icon name="trash"></ion-icon></button>
</ion-item-options>
</ion-item-sliding>
</ion-list>
Seite ts:
shoppingItems: AngularFireList<any>;
constructor(public navCtrl: NavController, public firebaseProvider: FirebaseProvider) {
this.shoppingItems = this.firebaseProvider.getShoppingItems();
}
Feuerbasis Anbieter
constructor(public afd: AngularFireDatabase) {
console.log('Hello FirebaseProvider Provider');
console.log("Shopping items"+afd.list('/shoppingItems/'))
}
getShoppingItems() {
console.log("Shopping items"+this.afd.list('/shoppingItems/'))
return this.afd.list('/shoppingItems/');
}
addItem(name) {
this.afd.list('/shoppingItems/').push(name);
}
Feuerbasis db
shoppingItems
-KxmiUt64GJsPT84LQsI: "qwerty"
-KxmifqyfD41tRPwFh07: "key"
Von der Web App konnte ich Elemente zu Firebase db hinzufügen. Aber ich konnte die Daten nicht von Firebase rendern. Ich erhalte den oben genannten Fehler.
Vielen Dank im Voraus für Ihre Hilfe.
dies viel wie https://stackoverflow.com/questions/47045479/integrating-firebase- aussieht with-ionic-3-and-angular .. –
@SurajRao ja, ich folge auch dem gleichen Tutorial. – jegadeesh