Currently diving into Angular 4 and utilizing Firebase database, but feeling a bit lost on how to showcase objects on my application's browser. I'm looking to extract user data and present it beautifully for the end-user.
import { Component, OnInit } from '@angular/core';
import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database';
import * as firebase from 'firebase/app';
@Component({
selector: 'app-about',
templateUrl: './about.component.html',
styleUrls: ['./about.component.css']
})
export class AboutComponent implements OnInit {
constructor() {
var allUsers = firebase.database().ref('users/');
var db = firebase.database().ref('/users/');
// Attach an asynchronous callback to read the data at our posts reference
db.on("value", function(snapshot) {
console.log(snapshot.val());
}, function (errorObject) {
console.log("The read failed: " + errorObject.code);
});
}
ngOnInit() {
}
}
Successfully displaying data in the console, but seeking assistance on translating that data from the console to appear on the browser. Any guidance would be appreciated!