How to use the @ngrx/effects.EffectsModule.runAfterBootstrap 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 benorama / ngrx-demo-apps / mobile / src / app / app.module.ts View on Github external
import { DemoCoreModule, CounterEffects } from 'ngrx-demo-core';

import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';

@NgModule({
  declarations: [
    MyApp,
    HomePage
  ],
  imports: [
    IonicModule.forRoot(MyApp),
    DemoCoreModule,
    StoreModule.provideStore(reducer),
    StoreDevtoolsModule.instrumentOnlyWithExtension(),
    EffectsModule.runAfterBootstrap(CounterEffects)
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}
github r-park / todo-angular-ngrx / src / tasks / index.ts View on Github external
const routes: Routes = [
  {path: 'tasks', component: TasksComponent}
];


@NgModule({
  declarations: [
    AutoFocusDirective,
    TaskFormComponent,
    TaskItemComponent,
    TaskListComponent,
    TaskListFilterPipe,
    TasksComponent
  ],
  imports: [
    EffectsModule.runAfterBootstrap(TaskEffects),
    FormsModule,
    RouterModule.forChild(routes),
    SharedModule
  ],
  providers: [
    TaskActions,
    TaskService
  ]
})

export class TasksModule {}

export { Task, TaskService, taskReducer };
github benorama / ngrx-demo-apps / web / src / app / counter / counter.module.ts View on Github external
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';

//import { CounterActions } from './counter.actions';
import { CounterEffects } from './counter.effects';
import { counterReducer } from './counter.reducer';

@NgModule({
  declarations: [
  ],
  imports: [
    EffectsModule.runAfterBootstrap(CounterEffects)
  ],
  providers: [
    //CounterActions
  ]
})
export class CounterModule {}
github benorama / ngrx-demo-apps / web / src / app / app.module.ts View on Github external
import { reducer } from './app.reducer';
import { AppComponent } from './app.component';

@NgModule({
  bootstrap: [
    AppComponent
  ],
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    DemoCoreModule,
    StoreModule.provideStore(reducer),
    StoreDevtoolsModule.instrumentOnlyWithExtension(),
    EffectsModule.runAfterBootstrap(CounterEffects)
  ],
  providers: []
})
export class AppModule { }