Guest User

Untitled

a guest
Jan 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. @Component({
  2. selector: 'page-schedule',
  3. templateUrl: 'list.html'
  4. })
  5. export class SchedulePage {
  6. itemsCollection: AngularFirestoreCollection<Schedule>;
  7. items: Observable<Schedule[]>;
  8. constructor(
  9. public db: AngularFirestore) {
  10. }
  11. ionViewDidLoad() {
  12. let loader = this.loadingCtrl.create({
  13. content: "Loading..."
  14. });
  15.  
  16. loader.present().then(() => {
  17. this.itemsCollection = this.db.collection('userschedules');
  18. this.items = this.itemsCollection.valueChanges();
  19. loader.dismiss();
  20. });
  21. }
  22. }
  23.  
  24. <ion-item class="text" *ngFor="let item of items | async">
  25. ...
  26. </ion-item>
Add Comment
Please, Sign In to add comment