Skip to content

Instantly share code, notes, and snippets.

@sanchezcarlosjr
Last active June 4, 2020 02:48
Show Gist options
  • Save sanchezcarlosjr/15f8f4ca469970732267f92cc81576db to your computer and use it in GitHub Desktop.
Save sanchezcarlosjr/15f8f4ca469970732267f92cc81576db to your computer and use it in GitHub Desktop.
Context pagination firestore pagination
import { AngularFireModule } from '@angular/fire';
import { NgxsModule } from '@ngxs/store';
import { NgxsStoreModule } from '../store/store.module';
@NgModule({
declarations: [AppComponent],
imports: [
//...
AngularFireModule.initializeApp(environment.firebase),
NgxsStoreModule
],
//...
})
export class AppModule { }
// ngxs.module...
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgxsModule } from '@ngxs/store';
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin';
import { NgxsReduxDevtoolsPluginModule } from '@ngxs/devtools-plugin';
import { DEVTOOLS_REDUX_CONFIG, LOGGER_CONFIG, OPTIONS_CONFIG, STATES_MODULES } from './store.config';
import { NgxsFirestoreModule } from '@ngxs-labs/firestore-plugin';
@NgModule({
imports: [
CommonModule,
NgxsModule.forRoot(STATES_MODULES, OPTIONS_CONFIG),
NgxsReduxDevtoolsPluginModule.forRoot(DEVTOOLS_REDUX_CONFIG),
NgxsLoggerPluginModule.forRoot(LOGGER_CONFIG),
NgxsFirestoreModule.forRoot()
],
exports: [NgxsModule],
})
export class NgxsStoreModule {}
//...
@NgModule({
declarations: [RacesComponent],
imports: [
CommonModule,
RacesRoutingModule,
NgxsModule.forFeature([RacesState])
],
})
export class RacesModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment