I would like to use this :

<ion-col class="champ" width-25 style="margin-right: 20px;">
        <div >
            Nom
        <ion-input placeholder="Dupont" [(ngModel)]="utilisateur.nom" type="text"></ion-input></div>
    </ion-col>

So [(ngModel)] come from my database and then I would like to update data like this :

EditData(id) {
    this.firestore.collection('users').doc(this.passided).update({
    nom: "a",})
}

So here, if I click on edit button nom will be "a" but I would like to use "utilisateur.nom" from ngmodel

Did you have any idea? Thanks.

EDIT

this.firestore.collection('users').doc(this.passided).valueChanges().subscribe(data => 
    { 


this.utilisateurs = Array.of(data);
            console.log(data);
console.log(this.utilisateurs);


 });

0 Answers