1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How can i use offline mode in @angular/fire 17.0.0

Discussão em 'Angular' iniciado por Witut, Outubro 15, 2024 às 18:03.

  1. Witut

    Witut Guest

    I initialize firestore this way in app.module.ts:

    importProvidersFrom([
    provideFirebaseApp(() => initializeApp(firebaseConfig)),
    provideAuth(() => getAuth()),
    provideFirestore(() => getFirestore()),
    fireProvideStorage(() => getStorage()),
    ]),


    How do I set the enablePersistence mode?

    I tried doing:

    {
    provide: FIRESTORE_SETTINGS,
    useValue: {
    experimentalForceLongPolling: true,
    experimentalAutoDetectLongPolling: false,
    useFetchStreams: false,
    enablePersistence: true,
    enableIndexedDbPersistence: true,
    enablePersistentCacheIndexAutoCreation: true,
    },
    },


    but it doesn't work :(

    Continue reading...

Compartilhe esta Página