Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Component({
- selector: 'page-schedule',
- templateUrl: 'list.html'
- })
- export class SchedulePage {
- itemsCollection: AngularFirestoreCollection<Schedule>;
- items: Observable<Schedule[]>;
- constructor(
- public db: AngularFirestore) {
- }
- ionViewDidLoad() {
- let loader = this.loadingCtrl.create({
- content: "Loading..."
- });
- loader.present().then(() => {
- this.itemsCollection = this.db.collection('userschedules');
- this.items = this.itemsCollection.valueChanges();
- loader.dismiss();
- });
- }
- }
- <ion-item class="text" *ngFor="let item of items | async">
- ...
- </ion-item>
Add Comment
Please, Sign In to add comment