Last active
June 1, 2018 07:40
-
-
Save wojtek1150/8b46b73bc1f1239809a374d0f2b1dd0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Action } from '@ngrx/store'; | |
export const LOAD_USERS = '[Users] Load Users'; // It's good practice to add namespace for each action module | |
export const LOAD_USERS_FAIL = '[Users] Load Users Fail'; | |
export const LOAD_USERS_SUCCESS = '[Users] Load Users Success'; | |
export class LoadUsers implements Action { | |
readonly type = LOAD_USERS; | |
} | |
export class LoadUsersFail implements Action { | |
readonly type = LOAD_USERS_FAIL; | |
constructor(public payload: any) {} | |
} | |
export class LoadUsersSuccess implements Action { | |
readonly type = LOAD_USERS_SUCCESS; | |
constructor(public payload: any) {} | |
} | |
// Action types | |
export type UsersAction = LoadUsers | LoadUsersFail | LoadUsersSuccess; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment