How to use the @ngrx/effects.EffectsModule.run function in @ngrx/effects

To help you get started, we’ve selected a few @ngrx/effects 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 justindujardin / angular-rpg / src / app / app.imports.ts View on Github external
// TODO: store/devtools disabled because of poor performance.
  //
  // Because devtools serializes state to JSON, if you have a large amount of data in your stores (~500 objects)
  // the time it takes to serialize and deserialize the object becomes significant. This is crippling to the
  // performance of the app.
  //
  // To re-enable the devtools, [fix this](https://github.com/ngrx/store-devtools/issues/57) and then pass
  // the option to use [Immutable compatible devtools](https://goo.gl/Wym3eT).
  //
  // StoreDevtoolsModule.instrumentStore(),

  EffectsModule.run(GameStateEffects),
  EffectsModule.run(CombatEffects),
  EffectsModule.run(SpritesEffects),
  EffectsModule.run(GameDataEffects),
  EffectsModule.run(AppEffects)
];
github hggeorgiev / ngx-redux-app / src / app / app.module.ts View on Github external
bootstrap: [ AppComponent ],
  declarations: [

    AppComponent,
    NewOperation,
    OperationsList,
    Currencies,
    CustomCurrencyPipe
  ],
  imports: [ // import Angular's modules
    NgbModule,
    BrowserModule,
    CommonModule,
    FormsModule,
    HttpModule,
    EffectsModule.run(CurrencyEffects),
    StoreModule.provideStore(reducer),


  ],
  providers: [CurrencyService]
})
export class AppModule {
  constructor() {}



}
github OfficeDev / script-lab-2017 / src / app.module.ts View on Github external
import { EffectsModule } from '@ngrx/effects';
import { rootReducer, createDefaultState } from './app/reducers';
import { SnippetEffects, MonacoEffects, UIEffects, GitHubEffects } from './app/effects';
import { environment } from './environment';

import './assets/styles/spinner.scss';
import './assets/styles/globals.scss';

@NgModule({
    imports: [
        BrowserModule,
        HttpModule,
        FormsModule,
        StoreModule.provideStore(rootReducer, createDefaultState(settings.current)),
        StoreDevtoolsModule.instrumentOnlyWithExtension(),
        EffectsModule.run(SnippetEffects),
        EffectsModule.run(MonacoEffects),
        EffectsModule.run(GitHubEffects),
        EffectsModule.run(UIEffects)
    ],
    declarations: [AppComponent, ...COMPONENT_DECLARATIONS, ...PIPES],
    bootstrap: [AppComponent],
    providers: [...SERVICE_PROVIDERS, EXCEPTION_PROVIDER]
})
export class AppModule {
    static async start() {
        try {
            if (!environment.current.devMode) {
                enableProdMode();
            }

            await Promise.all([
github apache / ambari-logsearch / ambari-logsearch-web / src / app / app.module.ts View on Github external
SharedModule,
    ShipperModule,

    StoreModule.provideStore(reducer),
    StoreDevtoolsModule.instrumentOnlyWithExtension({
      maxAge: 5
    }),

    AppRoutingModule,

    EffectsModule.run(AuthEffects),
    EffectsModule.run(AuditLogReposEffects),
    EffectsModule.run(UserSettingsEffects),
    EffectsModule.run(NotificationEffects),
    EffectsModule.run(ApiFeaturesEffects)

  ],
  providers: [
    HttpClientService,
    UtilsService,
    RoutingUtilsService,
    LogsContainerService,
    ComponentGeneratorService,
    ServerSettingsService,
    AppSettingsService,
    AppStateService,
    AuditLogsService,
    AuditLogsGraphDataService,
    ServiceLogsService,
    ServiceLogsHistogramDataService,
    ServiceLogsTruncatedService,
github tmpo-io / tracks / src / app / store / store.module.ts View on Github external
import { reducerTracks } from './reducers';

import { Storage } from './storage';

import * as router from '../router/reducer';
import { swreducer } from '../sw/reducer';

@NgModule({
  imports: [
    StoreModule.provideStore({
      data: reducerTracks,
      router: router.reducer,
      sw: swreducer,
    }),
    EffectsModule.run(Storage)
  ]
})
export class TracksStoreModule {}
github aviabird / listify / src / app / app.module.ts View on Github external
}
    ),
    StoreModule.provideStore(reducer),
    RouterStoreModule.connectRouter(),
    StoreDevtoolsModule.instrumentStore({
      monitor: useLogMonitor({
        visible: false,
        position: 'right'
      })
    }),
    StoreLogMonitorModule,
    EffectsModule.run(UserAuthEffects),
    EffectsModule.run(UserEffects),
    EffectsModule.run(ListEffects),
    EffectsModule.run(FeedsEffects),
    EffectsModule.run(UserListsEffects)
  ],
  providers: [
    actions,
    UserAuthService,
    AuthGuardService,
    ApiService,
    ResponseParseService
    ],
  bootstrap: [AppComponent]
})
export class AppModule { }
github loiane / ionic3-firebase-ngrx / src / app / app.module.ts View on Github external
@NgModule({
  declarations: [
    MyApp
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),

    AngularFireModule.initializeApp(firebaseConfig),
    AngularFireDatabaseModule,
    AngularFireAuthModule,

    StoreModule.provideStore(reducers),
    EffectsModule.run(NavEffects),
    EffectsModule.run(AuthEffects),
    EffectsModule.run(TaskEffects),
    EffectsModule.run(CameraEffects),
    StoreDevtoolsModule.instrumentOnlyWithExtension() //debug chrome extension
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    NavStoreService,
    AuthProvider,
    AuthStoreService,
    TasksProvider,
    CameraStoreService,
github Hongbo-Miao / webtorrent-player / src / app / +player / modules / player.module.ts View on Github external
PlayerComponent
} from '../components/';
import { PlayerService } from '../services/';
import { PlayerEffects } from '../effects/';

import { SharedModule } from '../../shared/modules/';
import { PlayerRoutingModule } from './';

@NgModule({
  imports: [
    SharedModule,

    PlayerRoutingModule,

    EffectsModule.run(PlayerEffects)
  ],
  declarations: [
    FullScreenComponent,
    InfoComponent,

    CompatibilityComponent,
    ProgressControllerComponent,
    ProgressSliderComponent,
    UrlComponent,
    VideoComponent,
    VolumeSliderComponent,

    PlayerComponent
  ],
  providers: [
    PlayerService
github apache / ambari-logsearch / ambari-logsearch-web / src / app / modules / shared / components / dropdown-list / dropdown-list.component.spec.ts View on Github external
serviceLogs,
          auditLogsFields,
          auditLogsGraphData,
          serviceLogsFields,
          serviceLogsHistogramData,
          appSettings,
          appState,
          clusters,
          components,
          serviceLogsTruncated,
          tabs,
          auth: auth.reducer,
          userSettings: userSettings.reducer
        }),
        EffectsModule.run(AuthEffects),
        EffectsModule.run(NotificationEffects),
        FormsModule
      ],
      providers: [
        ...MockHttpRequestModules,
        ComponentGeneratorService,
        LogsContainerService,
        HostsService,
        AuditLogsService,
        ServiceLogsService,
        AuditLogsFieldsService,
        AuditLogsGraphDataService,
        ServiceLogsFieldsService,
        ServiceLogsHistogramDataService,
        AppSettingsService,
        AppStateService,
        ClustersService,
github dancancro / great-big-example-application / src / app / crisis / crisis.module.ts View on Github external
import { CommonModule } from '@angular/common';
import { EffectsModule } from '@ngrx/effects';

import { SharedModule } from '../shared/shared.module';
import { CrisisPage } from './crisis.page';
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
import { routing } from './crisis.routing';
import { CrisisEffects } from '../core/store/crisis/crisis.effects';
import { DataService } from '../core/store/data.service';
import { DialogService } from '../shared/dialog/dialog.service';

@NgModule({
  imports: [
    SharedModule,
    routing,
    EffectsModule.run(CrisisEffects)],
  declarations: [
    CrisisDetailComponent,
    CrisisPage],
  providers: [
    DataService,
    DialogService
  ]
})
export class CrisisModule { }


/*
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/