I use AngularFire2 to get data from Firebase Database (realtime).
What I have done:
{
“class” : {
“student” : {
“Tom” : “male”,
“Mary” : “female”,
“Peter” : “male”,
“Laura” : “female”
},
"numberOfStudent” : 10
}
}
<h2>Class size: {{ (class | async)?.numberOfStudent }}</h2>
<ul>
<li *ngFor="let i of students | async">
{{i.key}} : {{i.value}}
</li>
</ul>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…