How to use the @ngrx/effects.EffectsModule.forFeature 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 anihalaney / rwa-trivia / projects / trivia-admin / src / app / game-play / game-play.module.ts View on Github external
ReportGameComponent
  ],
  entryComponents: [
    GameDialogComponent,
    ReportGameComponent
  ],
  imports: [
    //rwa modules
    SharedModule,
    GamePlayRoutingModule,

    //ngrx feature store
    StoreModule.forFeature('gameplay', reducer),

    //ngrx effects
    EffectsModule.forFeature(effects),

  ],
  providers: [
  ]
})
export class GamePlayModule { }
github bwsw / cloudstack-ui / src / app / root-store / server-data / user-tags / user-tags-store.module.ts View on Github external
import { NgModule } from '@angular/core';
import { StoreModule } from '@ngrx/store';
import { EffectsModule } from '@ngrx/effects';

import { reducer } from './user-tags.reducer';
import { UserTagsEffects } from './user-tags.effects';

@NgModule({
  imports: [
    StoreModule.forFeature('userTags', reducer),
    EffectsModule.forFeature([UserTagsEffects]),
  ],
})
export class UserTagsStoreModule {}
github stefanoslig / angular-ngrx-nx-realworld-example-app / libs / ngrx-router / src / lib / ngrx-router.module.ts View on Github external
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { routerReducer, RouterStateSerializer, StoreRouterConnectingModule } from '@ngrx/router-store';
import { StoreModule } from '@ngrx/store';

import { CustomSerializer } from './+state/custom-serializer';
import { RouterEffects } from './+state/router.effects';

@NgModule({
  imports: [
    CommonModule,
    StoreModule.forFeature('router', routerReducer),
    EffectsModule.forFeature([RouterEffects]),
    StoreRouterConnectingModule.forRoot({ stateKey: 'router' }),
  ],
  providers: [RouterEffects, [{ provide: RouterStateSerializer, useClass: CustomSerializer }]],
})
export class NgrxRouterModule {}
github Educama / Showcase / frontend / src / app / customer / customer-common / customer-common.module.ts View on Github external
import {NgModule} from "@angular/core";
import {SharedModule} from "../../shared/shared.module";
import {CUSTOMER_ROUTING} from "./routes/customer.routes";
import {EffectsModule} from "@ngrx/effects";
import {CustomerListEffect} from "./effects/customer-list.effect";
import {CustomerCaptureEffect} from "./effects/customer-capture.effects";
import {CustomerService} from "./api/customer.service";

@NgModule({
  imports: [
    CUSTOMER_ROUTING,
    SharedModule,
    EffectsModule.forFeature([
      CustomerListEffect,
      CustomerCaptureEffect
    ])
  ],
  providers: [
    CustomerService
  ]
})
export class CustomerCommonModule {
}
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / cart / store / cart-store.module.ts View on Github external
[`${CART_FEATURE}.active.value.content.guid`]: StorageSyncType.LOCAL_STORAGE,
          [`${CART_FEATURE}.active.value.content.code`]: StorageSyncType.LOCAL_STORAGE,
        },
      },
    },
  };
  return config;
}

@NgModule({
  imports: [
    CommonModule,
    HttpClientModule,
    StateModule,
    StoreModule.forFeature(CART_FEATURE, reducerToken, { metaReducers }),
    EffectsModule.forFeature(effects),
    ConfigModule.withConfigFactory(cartStoreConfigFactory),
  ],
  providers: [reducerProvider],
})
export class CartStoreModule {}
github lydemann / Angular-demo-with-best-practices / src / app / core / todo-list / redux-api / todo-list-store.module.ts View on Github external
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';

import { TodoListEffects } from './todo-list.effects';
import { todoListReducers } from './todo-list.reducers';
import { TodoListSelector } from './todo-list.selector';

@NgModule({
  imports: [
    StoreModule.forFeature('todoList', todoListReducers),
    EffectsModule.forFeature([TodoListEffects])
  ],
  providers: [TodoListSelector]
})
export class TodoListStoreModule {}
github Educama / Showcase / frontend / src / app / flights / flights-common / flights-common.module.ts View on Github external
import {NgModule} from "@angular/core";
import {SharedModule} from "../../shared/shared.module";
import {EffectsModule} from "@ngrx/effects";
import {AirportService} from "./api/airports/airport.service";
import {AirportEffects} from "./store/airports/airports.effect";
import {AirlineEffects} from "./store/airlines/airlines.effects";
import {AirlineService} from "./api/airlines/airline.service";

@NgModule({
  imports: [
    EffectsModule.forFeature([
      AirlineEffects,
      AirportEffects
    ]),
    SharedModule
  ],
  providers: [
    AirlineService,
    AirportService
  ]
})
export class FlightsCommonModule {
}
github maktarsis / concept-store-platform / src / app / views / shop / shop.module.ts View on Github external
import { ShopHub } from './hub/shop.hub';
import { ShopComponent } from './containers/shop/shop.component';
import { ShopBarComponent } from './components/shop-bar/shop-bar.component';
import { ShopApparelsComponent } from './components/shop-apparels/shop-apparels.component';
import { ShopCartComponent } from './containers/shop-cart/shop-cart.component';
import { ShopCartButtonComponent } from './components/shop-cart-button/shop-cart-button.component';
import { ShopCartBubbleComponent } from './components/shop-cart-bubble/shop-cart-bubble.component';

@NgModule({
  imports: [
    CommonModule,
    RouterModule,
    ShopHub,
    SharedModule,
    StoreModule.forFeature(States.Shop, shopReducers),
    EffectsModule.forFeature(shopEffects)
  ],
  declarations: [
    ShopComponent,
    ShopBarComponent,
    ShopApparelsComponent,
    ShopCartComponent,
    ShopCartButtonComponent,
    ShopCartBubbleComponent
  ]
})
export class ShopModule {}