Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70754

Display data from the Firebase Database

$
0
0

@thecolmix wrote:

Good evening, thank you. I can recover from the console but I can not see the content on the address page. I have this error

adresse.page.ts

adresse = {} as Adresse;

  constructor(private router: Router) {}

  ngOnInit(){
    let useradresse = firebase.database().ref('adresse/'+ firebase.auth().currentUser.uid);
    useradresse.once('value').then((snapshot) => {
      snapshot.forEach((addressSnapshot) => {
        console.log (addressSnapshot.val()); // shows the address value 
        this.adresse = addressSnapshot.val();
      })
    })

  }

Page html

<ion-content>
    <ion-card *ngFor="let adress of adresse; let i = index" (click)="onViewAdresse(i)">
        <ion-card-content>
            <ion-row>
                <ion-col size="9" >
                        <!--<ion-col size="9" (click)="goTo(adress)">-->
                    <div><b>{{adress.prenom}} {{adress.nom}} </b></div>
                    <div>{{adress.commune}}</div>
                    <div>{{adress.numeroF}}</div>

                </ion-col>
                <ion-col size="3">
                    <div class="color-edit"><b>Modifier</b></div>
                </ion-col>
              </ion-row>
          </ion-card-content>
      </ion-card>

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70754

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>