You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using angularfire2 with ionic3 to send and get data realtime from firebase.
I have used this command to install it and it worked npm install firebase @angular/fire --save
retrieve data is working by using this code
this.categorieslistitems= this.db.list('/categories', ref => ref.orderByChild('title')); this.categorieslistitems.snapshotChanges().subscribe(actions => { actions.forEach(action=>{ let ky = action.payload.toJSON() ky['key'] = action.key this.categoriesitemArray.push(ky as postdata1)})})
`
export interface postdata1 {
key?: string;
title:string;
img:string;
}
`
using open firebase security rules
now I am getting data from firebase correctly ,
but when I add or delete data from firebase ,my item array or my list getting duplicated in the app only ,and its not duplicated in the database ,when i refresh the app its return normal
adding only the last data have inserted to firebase in realtime
data getting duplicated in app only with adding the new recorded with the duplicated record
The text was updated successfully, but these errors were encountered:
"angularfire2": "^5.0.2",
"firebase": "^5.5.5",
"ionic-angular": "3.9.2",
"angular/compiler": "5.2.11",,
"angular/fire": "^5.0.2",
I am using angularfire2 with ionic3 to send and get data realtime from firebase.
I have used this command to install it and it worked
npm install firebase @angular/fire --save
retrieve data is working by using this code
this.categorieslistitems= this.db.list('/categories', ref => ref.orderByChild('title')); this.categorieslistitems.snapshotChanges().subscribe(actions => { actions.forEach(action=>{ let ky = action.payload.toJSON() ky['key'] = action.key this.categoriesitemArray.push(ky as postdata1)})})
`
export interface postdata1 {
key?: string;
title:string;
img:string;
}
`
using open firebase security rules
now I am getting data from firebase correctly ,
but when I add or delete data from firebase ,my item array or my list getting duplicated in the app only ,and its not duplicated in the database ,when i refresh the app its return normal
adding only the last data have inserted to firebase in realtime
data getting duplicated in app only with adding the new recorded with the duplicated record
The text was updated successfully, but these errors were encountered: