How can i display my child snapshot values in .html page


#1
var uuid= this.device.uuid;
      var commentsRef = this.firedb.database.ref('UserData');
      commentsRef.on('child_added', function(snapshot) {
        snapshot.forEach(function(childSnapshot){

          //console.log(childSnaphot.key)
          

            if(childSnapshot.key=='imeiNumber'){
              if(childSnapshot.val()=='529c98110f336e52'){
                 var c = childSnapshot.val()
                console.log(c);
               
                
            }else{
              console.log('No such value exists')
  
            }

          }
          
          
        });
         
        
      });
      

#2

Hello,
if I understood it right, then store your data you wanna show in an array. In html use *ngFor to iterate over this array and show it with string interpolation like {{whatever}}.

Best regards, anna-liebt


#3

Thank you i have done it through other way


#4

Great,
post your solution to help other people.

Best regards, anna-liebt