Created
March 25, 2018 01:20
-
-
Save peterbsmyth/01b05471fe6c6b69934a9158261c30a8 to your computer and use it in GitHub Desktop.
post.actions.ts
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'; | |
import { Update } from '@ngrx/entity'; | |
import { Post } from './post.model'; | |
export enum PostActionTypes { | |
LoadPosts = '[Post] Load Posts', | |
LoadPostsComplete = '[Post] Load Posts Complete', | |
} | |
export class LoadPosts implements Action { | |
readonly type = PostActionTypes.LoadPosts; | |
} | |
export class LoadPostsComplete implements Action { | |
readonly type = PostActionTypes.LoadPostsComplete; | |
constructor(public payload: { posts: Post[] }) {} | |
} | |
export type PostActions = | |
LoadPosts | |
| LoadPostsComplete; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment