1

what is the correct way to update a firebase value? is it to use firebase-document? I understand that in polymerfire, has been deprecated. However, in https://github.com/PolymerLabs/todo-list, I could simply update the collection like so:

<firebase-collection location="{{userLocation}}" data="{{fbTodos}}" 
                     on-firebase-value="_firebaseLoaded">
</firebase-collection>
_firebaseLoaded: function() {
    this._firebaseConnected = true;
    this.todos = this.fbTodos;
    this.backupTodos = this.fbTodos;
    this.linkPaths('fbTodos', 'todos');
    this.linkPaths('backupTodos', 'todos');
    },

......

deleteTodo: function(e) {
 this.arrayDelete('todos', e.detail.todo);
 },

What is the proper way to update firebase db? Btw, what does this.linkPaths do? Without linkPaths, the firebase db is not updated.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
user3240644
  • 2,211
  • 2
  • 24
  • 35

1 Answers1

0

Based on the reply on this issue https://github.com/firebase/polymerfire/issues/15, it seems is the way to go.

user3240644
  • 2,211
  • 2
  • 24
  • 35