-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
Cool library!
Did you consider adding a namespace for the *.actions.ts and *.reducer.ts generated files.
e.g.,
teams.actions.ts file will have:
import { Action } from '@ngrx/store';
export namespace TeamUsersActions{
export const LOAD = '[Team Users] Load';
export const LOAD_SUCCESS = '[Team Users] Load Success';
export const LOAD_FAIL = '[Team Users] Load Fail';
/**
* Load Team Users Actions
*/
export class LoadAction implements Action {
readonly type = LOAD;
}
export class LoadSuccessAction implements Action {
readonly type = LOAD_SUCCESS;
constructor(public payload: any) { }
}
export class LoadFailAction implements Action {
readonly type = LOAD_FAIL;
constructor(public payload: any) { }
}
export type Actions =
| LoadAction
| LoadSuccessAction
| LoadFailAction;
}
Then you can use it as:
import {TeamUsersActions} from "./team-users.actions";
TeamUsersActions.LoadAction() and TeamUsersActions.Actions etc.
alpavlove