From 0cdb6547fb912087015cc62d77d3c8d0f76cafd4 Mon Sep 17 00:00:00 2001 From: crusader Date: Tue, 6 Mar 2018 15:02:20 +0900 Subject: [PATCH] ing --- .../noauth/noauth-probe-store.module.ts | 24 +++++++++++++++++++ src/packages/noauth/noauth-probe.constant.ts | 3 +++ src/packages/noauth/noauth.module.ts | 5 +++- src/packages/noauth/store/index.ts | 13 ++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 src/packages/noauth/noauth-probe-store.module.ts create mode 100644 src/packages/noauth/noauth-probe.constant.ts create mode 100644 src/packages/noauth/store/index.ts diff --git a/src/packages/noauth/noauth-probe-store.module.ts b/src/packages/noauth/noauth-probe-store.module.ts new file mode 100644 index 0000000..6ea8543 --- /dev/null +++ b/src/packages/noauth/noauth-probe-store.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import { StoreModule } from '@ngrx/store'; +import { StoreDevtoolsModule } from '@ngrx/store-devtools'; +import { + StoreRouterConnectingModule, + RouterStateSerializer, +} from '@ngrx/router-store'; +import { EffectsModule } from '@ngrx/effects'; +import { combineReducers, ActionReducer, ActionReducerMap, MetaReducer } from '@ngrx/store'; + +import { + REDUCERS, + EFFECTS, +} from './store'; + +import { MODULE } from './noauth-probe.constant'; + +@NgModule({ + imports: [ + StoreModule.forFeature(MODULE.name, REDUCERS), + EffectsModule.forFeature(EFFECTS), + ], +}) +export class NoAuthProbeStoreModule { } diff --git a/src/packages/noauth/noauth-probe.constant.ts b/src/packages/noauth/noauth-probe.constant.ts new file mode 100644 index 0000000..1be6283 --- /dev/null +++ b/src/packages/noauth/noauth-probe.constant.ts @@ -0,0 +1,3 @@ +export const MODULE = { + name: 'noAuthProbe' +}; diff --git a/src/packages/noauth/noauth.module.ts b/src/packages/noauth/noauth.module.ts index e418b4e..9a11791 100644 --- a/src/packages/noauth/noauth.module.ts +++ b/src/packages/noauth/noauth.module.ts @@ -1,12 +1,15 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NoAuthProbeStoreModule } from './noauth-probe-store.module'; + import { COMPONENTS } from './component'; import { SERVICES } from './service'; @NgModule({ imports: [ - CommonModule + CommonModule, + NoAuthProbeStoreModule, ], declarations: [ COMPONENTS, diff --git a/src/packages/noauth/store/index.ts b/src/packages/noauth/store/index.ts new file mode 100644 index 0000000..84813f3 --- /dev/null +++ b/src/packages/noauth/store/index.ts @@ -0,0 +1,13 @@ +import * as NoAuthProbeStore from './noauth-probe'; + +export interface State { + noAuthProbe: NoAuthProbeStore.State; +} + +export const REDUCERS = { + noAuthProbe: NoAuthProbeStore.reducer, +}; + +export const EFFECTS = [ + NoAuthProbeStore.Effects, +];