Last active
June 4, 2020 02:48
-
-
Save sanchezcarlosjr/15f8f4ca469970732267f92cc81576db to your computer and use it in GitHub Desktop.
Context pagination firestore pagination
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
@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