Skip to content

Offline first behavior (Serve cached datas first) #1243

@mparpaillon

Description

@mparpaillon

Version info

Angular: 4.4.3
Firebase: 4.5.0
AngularFire: 5.0.0-rc.2
Ionic: 3.7.1

How to reproduce these conditions

Steps to set up and reproduce

Make any query to Firestore

this.db.collection<HeroServerData>('heroes').valueChanges();

Expected behavior

The Observable should emit first the local datas then a second time when the Firestore query is back. An offline first behavior basically.

Actual behavior

The Observable seems to wait for the server response. If none received, use the local datas.

It's hard to create a plunkr for this. Hope it will be clear enough.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions