Done
This commit is contained in:
parent
ac266e77ce
commit
ae74e61e20
@ -1,6 +1,6 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Show} from '../model/show';
|
||||
import {collection, collectionData, Firestore} from '@angular/fire/firestore';
|
||||
import {collection, collectionData, Firestore, orderBy, query} from '@angular/fire/firestore';
|
||||
import {Observable} from 'rxjs';
|
||||
|
||||
@Injectable({
|
||||
@ -12,7 +12,8 @@ export class ShowService {
|
||||
|
||||
constructor(private firestore: Firestore) {
|
||||
const showsRef = collection(this.firestore, this.seriesCollection);
|
||||
this.shows$ = collectionData(showsRef, {idField: 'uid'}) as Observable<Show[]>;
|
||||
const showsQuery = query(showsRef, orderBy('id'));
|
||||
this.shows$ = collectionData(showsQuery, {idField: 'uid'}) as Observable<Show[]>;
|
||||
}
|
||||
|
||||
getShows() {
|
||||
|
Reference in New Issue
Block a user