How to use the @angular/fire/firestore.AngularFirestoreModule.enablePersistence function in @angular/fire

To help you get started, we’ve selected a few @angular/fire examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jamesdaniels / onSnapshot / src / app / app.module.ts View on Github external
HomeComponent,
    NavComponent
  ],
  imports: [
    CommonModule,
    BrowserModule.withServerTransition({appId: 'my-app'}),
    ServiceWorkerModule.register('/ngsw-worker.js', {enabled: environment.production}),
    RouterModule.forRoot([
      { path: '', component: HomeComponent, pathMatch: 'full'},
      { path: 'articles/:id', loadChildren: () => import('./article/article.module').then(m => m.ArticleModule)},
      { path: 'authors/:id', loadChildren: () => import('./author/author.module').then(m => m.AuthorModule), ...canActivate(loggedIn)}
    ], { preloadingStrategy: PreloadAllModules, initialNavigation: 'enabled' }),
    AngularFireModule.initializeApp(environment.firebase),
    AngularFireAuthModule,
    AngularFireDatabaseModule,
    AngularFirestoreModule.enablePersistence(),
    AngularFireAuthGuardModule,
    AngularFirePerformanceModule,
    AngularFireMessagingModule
    //PrebootModule.withConfig({ appRoot: 'app-root' })
  ],
  bootstrap: [ ],
  providers: [
//    { provide: EnableStateTransferToken, useValue: true }
  ]
})
export class AppModule { }
github 0918nobita / Tsundoku / client / src / app / app.module.ts View on Github external
SettingsModal,
    SearchPage,
    ProgressCard,
    SkillControlModal,
    PlanControlModal,
    BooksBySkillModal
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp, {
      backButtonText: '戻る'
    }),
    AngularFireModule.initializeApp(firebaseConfig),
    AngularFireAuthModule,
    AngularFireFunctionsModule,
    AngularFirestoreModule.enablePersistence(),
    LoginPageModule,
    StoreModule.forRoot(reducers),
    EffectsModule.forRoot([
      BookEffects,
      BookshelfEffects,
      PlanEffects,
      AuthEffects,
      SkillEffects
    ]),
    NgxGistModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    ProgressPage,
    AchievementPage,
github Jaspero / fireshop / client / apps / dashboard / src / app / app.module.ts View on Github external
@NgModule({
  declarations: [AppComponent, LayoutComponent],
  imports: [
    BrowserModule,
    AppRoutingModule,
    SharedModule,
    BrowserAnimationsModule,

    FileUploadModule.forRoot(),

    /**
     * External
     */
    AngularFireModule.initializeApp(ENV_CONFIG.firebase),
    AngularFirestoreModule.enablePersistence(),
    AngularFirePerformanceModule
  ],
  providers: [
    {
      provide: APP_INITIALIZER,
      useFactory: init,
      deps: [Injector],
      multi: true
    }
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}
github Jaspero / fireshop / client / apps / shop / src / app / app.module.ts View on Github external
@NgModule({
  declarations: [AppComponent, ...ENTRY_COMPONENTS],
  imports: [
    BrowserModule,
    SharedModule,
    AppRoutingModule,
    BrowserAnimationsModule,
    ServiceWorkerModule.register('ngsw-worker.js', {
      enabled: environment.serviceWorker
    }),

    /**
     * External
     */
    AngularFireModule.initializeApp(ENV_CONFIG.firebase),
    AngularFirestoreModule.enablePersistence(),
    AngularFireAuthModule,
    AngularFirePerformanceModule,
    MatProgressBarModule,
    JpImagePreloadModule.forRoot()
  ],
  providers: [
    {
      provide: APP_INITIALIZER,
      useFactory: init,
      deps: [Injector],
      multi: true
    }
  ],
  bootstrap: [AppComponent],
  entryComponents: ENTRY_COMPONENTS
})
github sdey0081 / ionic-messenger-starter / src / app / app.module.ts View on Github external
import { environment } from '../environments/environment';

@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [
    BrowserModule,
    IonicModule.forRoot(),
    AppRoutingModule,
    ComponentsModule,
    ServicesModule,
    HttpClientModule,

    AngularFireModule.initializeApp(environment.firebaseConfig),
    AngularFirestoreModule.enablePersistence(),
    AngularFireAuthModule,
    AngularFireStorageModule,
  ],
  providers: [
    StatusBar,
    SplashScreen,
    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}
github judithgull / koans / src / app / store / series / series.effect.spec.ts View on Github external
beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [
        HttpClientTestingModule,
        AngularFireModule.initializeApp(environment.firebase),
        AngularFirestoreModule,
        AngularFirestoreModule.enablePersistence()
      ],
      providers: [
        SeriesService,
        SeriesEffects,
        { provide: Actions, useFactory: getActions },
        { provide: ToastrService, useClass: MockToastrService }
      ]
    });

    actions$ = TestBed.get(Actions);
    service = TestBed.get(SeriesService);
    effects = TestBed.get(SeriesEffects);
    toastr = TestBed.get(ToastrService);

    spyOn(service, 'getSeries').and.returnValue(of(mockSeries));
    spyOn(service, 'create').and.returnValue(of(mockSeries[0]));