当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript NgRedux.configureStore方法代码示例

本文整理汇总了TypeScript中@angular-redux/store.NgRedux.configureStore方法的典型用法代码示例。如果您正苦于以下问题:TypeScript NgRedux.configureStore方法的具体用法?TypeScript NgRedux.configureStore怎么用?TypeScript NgRedux.configureStore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@angular-redux/store.NgRedux的用法示例。


在下文中一共展示了NgRedux.configureStore方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: constructor

  constructor(private ngRedux: NgRedux<IAppState>,
              private router: Router,
              private userEpics: UserEpics,
              private profileEpics: ProfileEpics,
              private quotesEpics: QuotesEpics,
              private usersEpics: UsersEpics) {

    const epics = [
      this.userEpics.signin,
      this.userEpics.signup,
      this.userEpics.resetPassword,
      this.userEpics.changePassword,
      this.profileEpics.fetchUser,
      this.profileEpics.updateUser,
      this.quotesEpics.fetchQuotes,
      this.quotesEpics.saveQuote,
      this.quotesEpics.updateQuoteModal,
      this.quotesEpics.updateQuote,
      this.quotesEpics.removeQuote,
      this.quotesEpics.recommendQuote,
      this.quotesEpics.unrecommendQuote,
      this.usersEpics.fetchUsers,
      this.usersEpics.followUser,
      this.usersEpics.unfollowUser,
    ];

    const epicsMiddlewares = epics.reduce((acc: any[], epic: any) => acc.concat(createEpicMiddleware(epic)), []);

    ngRedux.configureStore(rootReducer, {}, [...middlewares, ...epicsMiddlewares], enhancers);
  }
开发者ID:rtbm,项目名称:ng2-quottr,代码行数:30,代码来源:app.component.ts

示例2: constructor

  constructor(
    private ngRedux: NgRedux<IAppState>,
    private devTool: DevToolsExtension,
    private rootEpic: RootEpic,
    private router: Router,
  ) {
    const middleware = [
      createEpicMiddleware(this.rootEpic.combineAll()),
      createLogger(),
    ];

    const reducer = compose(
      mergePersistedState()
    )(rootReducer);

    const storage = compose(
      filter('auth')
    )(adapter(window.localStorage));

    const enhancers = [
      persistState(storage, 'fyibn/store'),
    ];

    if (devTool.isEnabled()) {
      enhancers.push(devTool.enhancer());
    }

    this.ngRedux.configureStore(
      reducer,
      {} as IAppState,
      middleware,
      enhancers,
    );
  }
开发者ID:pusherman,项目名称:fyibn-ui,代码行数:34,代码来源:app.component.ts

示例3: constructor

 constructor(ngRedux: NgRedux<IAppState>, devTools: DevToolsExtension) {
   ngRedux.configureStore(
     rootReducer,
     INITIAL_STATE,
     [],
     devTools.isEnabled() ? [ devTools.enhancer() ] : []
   );
 }
开发者ID:Nightspeller,项目名称:streamViewer,代码行数:8,代码来源:app.module.ts

示例4: constructor

 constructor(ngRedux: NgRedux<IAppState>) {
   // Tell @angular-redux/store about our rootReducer and our initial state.
   // It will use this to create a redux store for us and wire up all the
   // events.
   ngRedux.configureStore(
     rootReducer,
     INITIAL_STATE);
 }
开发者ID:,项目名称:,代码行数:8,代码来源:

示例5: constructor

  constructor(
    private ngRedux: NgRedux<IAppState>,
    private devTool: DevToolsExtension) {

    // configure the store here, this is where the enhancers are set
    this.ngRedux.configureStore(rootReducer, {},
      isDevMode() ? [createLogger({ collapsed: true })] : [],
      isDevMode() && devTool.isEnabled() ? [...enhancers, devTool.enhancer()] : [...enhancers]);
  }
开发者ID:projectSHAI,项目名称:expressgular2,代码行数:9,代码来源:redux.module.ts

示例6: beforeEach

 beforeEach(inject([NgRedux], (store: NgRedux<AppState>) => {
     store.configureStore(rootReducer, {
         ...APP_INITIAL_STATE,
         inventur: {
             ...INVENTUR_INITIAL_STATE,
             inventurId: testfall.inventurId,
             eroeffnungsbilanz: testfall.eroeffnungsbilanz
         }
     })
 }))
开发者ID:haschi,项目名称:dominium,代码行数:10,代码来源:bilanz.service.spec.ts

示例7: constructor

  constructor(
    private ngRedux: NgRedux<IAppState>,
    private devTool: DevToolsExtension) {

    this.ngRedux.configureStore(
      rootReducer,
      {},
      [ createLogger() ],
      [ ...enhancers, devTool.isEnabled() ? devTool.enhancer() : f => f]);
  }
开发者ID:veanyee,项目名称:store,代码行数:10,代码来源:app.component.ts

示例8: constructor

 constructor(private ngRedux:NgRedux<any>) {
   this.ngRedux.configureStore(
     rootReducer, {
       apiPanel:configJcropInitialState('apiPanel'),
       defaultPanel:configJcropInitialState('defaultPanel'),
       showSelectionPanel:configJcropInitialState('showSelectionPanel'),
       previewPanel:configJcropInitialState('previewPanel'),
       animationsPanel:configJcropInitialState('animationsPanel'),
       stylingPanel:configJcropInitialState('stylingPanel'),
     }
   );
 }
开发者ID:Arne-Sandberg,项目名称:HawsIoT-WebApp,代码行数:12,代码来源:image-editor.module.ts

示例9: constructor

    constructor(
        public store: NgRedux<AppStateModel>,
        ngReduxRouter: NgReduxRouter
    ) {
        store.configureStore(rootReducer, initialState);

        if (ngReduxRouter) {
            ngReduxRouter.initialize();
        }

        provideReduxForms(store);
    }
开发者ID:RCata,项目名称:Work-Work,代码行数:12,代码来源:store.module.ts

示例10: constructor

  constructor(
    private ngRedux: NgRedux<IAppState>,
    private devTools: DevToolsExtension
  ) {

    const tools = devTools.isEnabled() ?
      [ ...enhancers, devTools.enhancer() ] : enhancers;

    ngRedux.configureStore(
      rootReducer,
      {},
      middleware,
      tools
    );
  }
开发者ID:christinakayastha,项目名称:parkabler,代码行数:15,代码来源:app.component.ts


注:本文中的@angular-redux/store.NgRedux.configureStore方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。