Created
September 17, 2017 15:54
-
-
Save philipszdavido/6e935f6b90a24932b71630998362efd4 to your computer and use it in GitHub Desktop.
This file contains 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
//src/app/redux/actions/articles.ts | |
import { Action } from '@ngrx/store'; | |
import { Article } from '../models/article'; | |
export const ActionTypes = { | |
LOAD_ARTICLES:'Load Articles', | |
ADD_ARTICLE: 'Add Article', | |
INCREMENT_ARTICLE_POINT: 'Increment Article Point', | |
DECREMENT_ARTICLE_POINT: 'Decrememnt Article Point' | |
} | |
export class AddArticleAction implements Action{ | |
type = ActionTypes.ADD_ARTICLE; | |
constructor(public payload:Article){} | |
} | |
export class IncrementArticlePointAction implements Action{ | |
type = ActionTypes.INCREMENT_ARTICLE_POINT; | |
constructor(public payload:Article){} | |
} | |
export class DecrementArticlePointAction implements Action{ | |
type = ActionTypes.DECREMENT_ARTICLE_POINT; | |
constructor(public payload:Article){} | |
} | |
export type Actions = AddArticleAction | DecrementArticlePointAction | IncrementArticlePointAction | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment