Help a newbie? The Firebase Firestore users/<user> collection contains a 
serials subcollection that I assign to serials$. Each one of those fields 
is turned into a string for a query of the 'serials' collection in 
Firestore. But nothing is logging to the console. Please assist.

Schema:
/users/<username>/serials/['ABC123','ABC124','ABC125']
/serials/ABC123/friendly_name = 'Near the house'
/serials/ABC124/friendly_name = 'Side yard'

  constructor(private afs: AngularFirestore) {

    const serialsDocument = afs.doc<Serial>('users/cdevidal');
    const serials$ = serialsDocument.collection<Serial>('serials').
valueChanges();
    const friendly_names$ = serials$.pipe(
      map(serial_record => {
        console.log('typeof serial_record: ');
        console.log(typeof serial_record);
        console.log('serial_record: ');
        console.log(serial_record);
        return afs.doc<FriendlyName>('serials/' + serial_record['serial']).
valueChanges()
      })
    );
    friendly_names$.pipe(combineAll()).subscribe(friendly_names_records => {
      console.log('typeof friendly_names_records: ');
      console.log(typeof friendly_names_records);
      console.log('friendly_names_records: ');
      console.log(friendly_names_records);
    });
  }


typeof serial_record: 
object
serial_record: 
(3) [{…}, {…}, {…}]
0: {serial: "ABC125"}
1: {serial: "ABC124"}
2: {serial: "ABC123"}
length: 3__proto__: Array(0)

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/94690647-d53b-40a6-b61f-bbe22f29987f%40googlegroups.com.

Reply via email to