This is how my database looks. I want to be able to grab all the names that are currently in the database and display them in form of list in the project.
Profile
|
|_ poTXrbBlRmZVCulutiHYBp3lj5D2
| |
| |_ Name :
| |
| |_ Email :
|
|_ hn3ds4hdsbBlRmpVCulutiHYBH3lj
| |
| |_ Name :
| |
| |_ Phone :
This is my home.ts file code. I want to show list of users as output in my .html file
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { AngularFireAuth } from 'angularfire2/auth';
import { AngularFireDatabase } from 'angularfire2/database';
@Component({
selector: 'page-main',
templateUrl: 'main.html',
})
export class MainPage {
userId : string = "";
constructor( public fire: AngularFireAuth, public navCtrl: NavController,
public db: AngularFireDatabase, public navParams: NavParams ) {
this.userId = fire.auth.currentUser.uid;
}
ionViewDidLoad() {
console.log('ionViewDidLoad MainPage');
}
}