This commit is contained in:
crusader 2018-10-23 22:08:08 +09:00
parent 1c29a83369
commit 2af851285c
6 changed files with 54 additions and 23 deletions

View File

@ -24,7 +24,7 @@ import * as InfraStore from '../../../store/infra/infra';
styleUrls: ['./display.component.scss']
})
export class DisplayComponent implements OnInit, AfterContentInit, OnDestroy {
private infraDisplayType$: Observable<InfraDisplayType>;
infraDisplayType$: Observable<InfraDisplayType>;
displaySidebar = false;
selectedInfraSubscription: Subscription | null;

View File

@ -2,7 +2,8 @@ import { Type } from '@angular/core';
import {
Selector,
createSelector,
combineReducers
combineReducers,
compose
} from '@ngrx/store';
import * as ConfigStore from './config';
@ -19,10 +20,17 @@ export const EFFECTS: Type<any>[] = [
RequestStore.RequestEffects,
];
export const REDUCER = combineReducers({
config: ConfigStore.reducer,
request: RequestStore.reducer,
});
export function reducer(state: any, action: any) {
return combineReducers({
config: ConfigStore.reducer,
request: RequestStore.reducer,
})(state, action);
}
// export const REDUCER = combineReducers({
// config: ConfigStore.reducer,
// request: RequestStore.reducer,
// });
export function getSelectors<S>(selector: Selector<any, State>) {
return {

View File

@ -2,7 +2,8 @@ import { Type } from '@angular/core';
import {
Selector,
createSelector,
combineReducers
combineReducers,
compose
} from '@ngrx/store';
import * as InterfacesStore from './interfaces';
@ -19,10 +20,17 @@ export const EFFECTS: Type<any>[] = [
UserStore.UserEffects,
];
export const REDUCER = combineReducers({
interfaces: InterfacesStore.reducer,
user: UserStore.reducer,
});
export function reducer(state: any, action: any) {
return combineReducers({
interfaces: InterfacesStore.reducer,
user: UserStore.reducer,
})(state, action);
}
// export const REDUCER = combineReducers({
// interfaces: InterfacesStore.reducer,
// user: UserStore.reducer,
// });
export function getSelectors<S>(selector: Selector<any, State>) {
return {

View File

@ -24,10 +24,10 @@ export const EFFECTS: Type<any>[] = [
export const REDUCERS: ActionReducerMap<any> = {
router: fromRouter.routerReducer,
discovery: DiscoveryStore.REDUCER,
environment: EnvironmentStore.REDUCER,
infra: InfraStore.REDUCER,
ui: UIStore.REDUCER,
discovery: DiscoveryStore.reducer,
environment: EnvironmentStore.reducer,
infra: InfraStore.reducer,
ui: UIStore.reducer,
};
// console.log all actions

View File

@ -2,7 +2,8 @@ import { Type } from '@angular/core';
import {
Selector,
createSelector,
combineReducers
combineReducers,
compose
} from '@ngrx/store';
import * as InfraStore from './infra';
@ -16,9 +17,15 @@ export const EFFECTS: Type<any>[] = [
InfraStore.InfraEffects,
];
export const REDUCER = combineReducers({
infra: InfraStore.reducer,
});
export function reducer(state: any, action: any) {
return combineReducers({
infra: InfraStore.reducer,
})(state, action);
}
// export const REDUCER = combineReducers({
// infra: InfraStore.reducer,
// });
export function getSelectors<S>(selector: Selector<any, State>) {
return {

View File

@ -2,7 +2,8 @@ import { Type } from '@angular/core';
import {
Selector,
createSelector,
combineReducers
combineReducers,
compose
} from '@ngrx/store';
import * as LayoutStore from './layout';
@ -16,9 +17,16 @@ export const EFFECTS: Type<any>[] = [
LayoutStore.LayoutEffects,
];
export const REDUCER = combineReducers({
layout: LayoutStore.reducer,
});
export function reducer(state: any, action: any) {
return combineReducers({
layout: LayoutStore.reducer,
})(state, action);
}
// export const REDUCER = combineReducers({
// layout: LayoutStore.reducer,
// });
export function getSelectors<S>(selector: Selector<any, State>) {
return {