I am using angularfire2 to communicate with the Google Firebase backend. This is the code:
import {Component} from '@angular/core';
import {AngularFire, FirebaseListObservable} from 'angularfire2';
@Component({
selector: 'app',
templateUrl: '
<ul>
<li *ngFor="let item in items | async">
{{ item.name }}
</li>
</ul>
',
})
class AppComponent {
items: Observable<any>;
constructor(af: AngularFire) {
this.items = af.database.list('/items');
}
}
The af.database.list('items')
instruction takes a few seconds to extract the information from Firebase.
Is there any way to know when the information is finished?
If I knew when the information has arrived I can show a "load bar" until the data arrives.
Thank you!