-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Schematics): Rename default action type for action blueprint
Closes #1040 BREAKING CHANGE: The action blueprint has been updated to be less generic, with associated reducer and effects updated for the feature blueprint BEFORE: export enum UserActionTypes { UserAction = '[User] Action' } export class User implements Action { readonly type = UserActionTypes.UserAction; } export type UserActions = User; AFTER: export enum UserActionTypes { LoadUsers = '[User] Load Users' } export class LoadUsers implements Action { readonly type = UserActionTypes.LoadUsers; } export type UserActions = LoadUsers;
- Loading branch information
1 parent
e711c28
commit 244d1de
Showing
3 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
...matics/src/action/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.actions.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { Action } from '@ngrx/store'; | ||
|
||
export enum <%= classify(name) %>ActionTypes { | ||
<%= classify(name) %>Action = '[<%= classify(name) %>] Action' | ||
Load<%= classify(name) %>s = '[<%= classify(name) %>] Load <%= classify(name) %>s' | ||
} | ||
|
||
export class <%= classify(name) %> implements Action { | ||
readonly type = <%= classify(name) %>ActionTypes.<%= classify(name) %>Action; | ||
readonly type = <%= classify(name) %>ActionTypes.Load<%= classify(name) %>s; | ||
} | ||
|
||
export type <%= classify(name) %>Actions = <%= classify(name) %>; | ||
export type <%= classify(name) %>Actions = Load<%= classify(name) %>s; |
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
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