stateChanges(events) {
        let source = docChanges(this.query, this.afs.schedulers.outsideAngular);
        if (events && events.length > 0) {
            source = source.pipe(map(actions => actions.filter(change => events.indexOf(change.type) > -1)));
        }
        return source.pipe(
        // We want to filter out empty arrays, but always emit at first, so the developer knows
        // that the collection has been resolve; even if it's empty
        startWith(undefined), pairwise(), filter(([prior, current]) => current.length > 0 || !prior), map(([prior, current]) => current), this.afs.keepUnstableUntilFirst);
    }
/**
     * Listen to the latest change in the stream. This method returns changes
     * as they occur and they are not sorted by query order. This allows you to construct
     * your own data structure.
     */
Listen to the latest change in the stream. This method returns changes
as they occur and they are not sorted by query order. This allows you to construct
your own data structure.
Listen to the latest change in the stream . This method returns changes as they occur and they are not sorted by query order . This allows you to construct your own data structure .
stateChanges(events) {
        let source = docChanges(this.query, this.afs.schedulers.outsideAngular);
        if (events && events.length > 0) {
            source = source.pipe(map(actions => actions.filter(change => events.indexOf(change.type) > -1)));
        }
        return source.pipe(
        startWith(undefined), pairwise(), filter(([prior, current]) => current.length > 0 || !prior), map(([prior, current]) => current), this.afs.keepUnstableUntilFirst);
    }
stateChanges ( events ) { let source = docChanges ( this . query , this . afs . schedulers . outsideAngular ) ; if ( events && events . length > 0 ) { source = source . pipe ( map ( actions => actions . filter ( change => events . indexOf ( change . type ) > - 1 ) ) ) ; } return source . pipe ( startWith ( undefined ) , pairwise ( ) , filter ( ( [ prior , current ] ) => current . length > 0 || ! prior ) , map ( ( [ prior , current ] ) => current ) , this . afs . keepUnstableUntilFirst ) ; }
Listen to the latest change in the stream.
Listen to the latest change in the stream .
// We want to filter out empty arrays, but always emit at first, so the developer knows // that the collection has been resolve; even if it's empty