Inquiry about Firebase and Angular 6

0

I want to develop a collapse with angular and firebase, that as I click on the button, I will see the following information in the form of a fan (collapse) . This information must be stored in the firebase database respecting the structure JSON of it.

For example: I want to automatically add child() to me so I can continue working on the same ID (Key) or generate another ID .

This is the method that I use to insert the data in the database, but I would need another where I can add child() automatically, for example place a for() that runs all ID and add me the child() necessary to respect the structure JSON .

setPlandCuenta(plandcuentas: PlanDCuenta) {

  this.listacuentas = this.firebase.list('plandcuenta');
  if (plandcuentas) {
    this.listacuentas.push({
      nombrepcuenta: plandcuentas.nombrepcuenta
    });
  }
}

I'm using AngularFire2

    
asked by Nahuel Jakobson 12.11.2018 в 13:05
source

0 answers