Remove data from Firebase with Ionic 3

Discussão em 'Angular' iniciado por Alihan Kayhan, Fevereiro 18, 2025.

  1. I want to remove a data from firebase but all documents I have found all said use .remove() function as I show as codesnippet here. But this is not work at Ionic 3. Is that function is changed or what is the point that I didn't see.

    selectBook(indexOfBook : Book){

    this.actionSheetCtrl.create({
    title: indexOfBook.nameOfBook,
    buttons:[{
    text:'Edit',
    handler: () =>{
    // TODO:Send the user to EditPage
    }

    },
    {
    text:'Delete',
    role: 'destructive',
    handler: () => {
    this.getBookRef$.remove(indexOfBook.key);//**************************************
    }
    },
    {
    text:'Cancel',
    role:'cancel',
    handler: () =>{
    console.log("The user has selected the cancel button");
    }
    }


    ]


    }).present();

    }

    Continue reading...

Compartilhe esta Página