Browse Source

feat(core): add dispatch function for set environment action

pull/2822/head
TheDiaval 7 years ago
parent
commit
586047682b
  1. 12
      npm/ng-packs/packages/core/src/lib/services/config-state.service.ts

12
npm/ng-packs/packages/core/src/lib/services/config-state.service.ts

@ -1,8 +1,12 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Store } from '@ngxs/store'; import { Store } from '@ngxs/store';
import {
AddRoute,
GetAppConfiguration,
PatchRouteByName,
SetEnvironment,
} from '../actions/config.actions';
import { ConfigState } from '../states'; import { ConfigState } from '../states';
import { GetAppConfiguration, PatchRouteByName, AddRoute } from '../actions/config.actions';
import { ABP } from '../models';
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root',
@ -61,4 +65,8 @@ export class ConfigStateService {
dispatchAddRoute(...args: ConstructorParameters<typeof AddRoute>) { dispatchAddRoute(...args: ConstructorParameters<typeof AddRoute>) {
return this.store.dispatch(new AddRoute(...args)); return this.store.dispatch(new AddRoute(...args));
} }
dispatchSetEnvironment(...args: ConstructorParameters<typeof SetEnvironment>) {
return this.store.dispatch(new SetEnvironment(...args));
}
} }

Loading…
Cancel
Save