Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return this.afs.collection("events").snapshotChanges().pipe(
- map(eventSnapshots => {
- return eventSnapshots.reduce((eventsArray: EventInterface[], eventSnapshot) => {
- eventsArray.push(EventImporterJSON.getEventFromJSON(<EventJSONInterface>eventSnapshot.payload.doc.data()));
- return eventsArray;
- }, []);
- }),
- );
- return this.afs.collection("events").snapshotChanges().pipe(
- map(eventSnapshots => {
- return eventSnapshots.reduce((eventsArray: EventInterface[], eventSnapshot) => {
- eventsArray.push(EventImporterJSON.getEventFromJSON(<EventJSONInterface>eventSnapshot.payload.doc.data()));
- // Here I need the help the below line returns an Observable<Snapshots[]>
- this.afs.collection("events").doc(eventSnapshot.payload.doc.id).collection('activities').snapshotchanges()
- return eventsArray;
- }, []);
- }),
- );
Add Comment
Please, Sign In to add comment