Created
July 3, 2019 20:26
-
-
Save webmasterdevlin/7c4f15eb4b78c7debf902f7012ce1787 to your computer and use it in GitHub Desktop.
NgXS Actions: src/app/heroes/hero.action.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 { Hero } from "./hero.model"; | |
export class GetHeroes { | |
static readonly type = "[Hero] Get"; | |
} | |
export class GetHeroById { | |
static readonly type = "[Hero] GetById"; | |
constructor(public id: string) {} | |
} | |
export class AddHero { | |
static readonly type = "[Hero] Add"; | |
constructor(public payload: Hero) {} | |
} | |
export class UpdateHero { | |
static readonly type = "[Hero] Update"; | |
constructor(public payload: Hero) {} | |
} | |
export class DeleteHero { | |
static readonly type = "[Hero] Delete"; | |
constructor(public id: string) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment