AngularFire2 Child_added event return all data again

南楼画角 提交于 2019-12-10 13:01:59

问题


Is the child_added event in angularfire is different in child_added on firebase?

why angularfire return all list including value after child_added while in firebase it only return la

 this.userList = this.room.getAllUser();
    this.userList.snapshotChanges()
      .subscribe(actions => {
         console.log(actions);
        actions.forEach(action => {
          console.log(action.type);
          console.log(action.key);
          console.log(action.payload.val());
        })

Do I need to scan again the response and compare the key if in array ? before pushing it ?

来源:https://stackoverflow.com/questions/47113599/angularfire2-child-added-event-return-all-data-again

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!