You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-1
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,38 @@ Then run the schematic in any project, assuming the angular/cli is installed and
120
120
121
121
ng g @briebug/ngrx-entity-schematic:add
122
122
123
+
## Adding another entity
124
+
125
+
The schematic does not yet support auto connecting the entity to the root store when running the schematic without the `--init` option. The following steps will be necessary to connect the entity to the store manually.
126
+
127
+
The following example assumes that an entity named `briebug` was first added with the initialization files (`--init`), followed by another entity named `order` without the initialization files.
128
+
129
+
1. add to the entity state from the `entity.reducer.ts` to the `state/app.interface.ts`.
130
+
131
+
```ts
132
+
exportinterfaceAppState {
133
+
router:RouterReducerState<RouterStateUrl>;
134
+
briebug:BriebugState;
135
+
order:OrderState;
136
+
}
137
+
```
138
+
139
+
2. add the entity reducer to the parent/root reducer in `state/app.reducer.ts`.
@@ -150,7 +182,7 @@ run the launch command with any inline options
150
182
151
183
### Test commands
152
184
153
-
The test command expects and entity name of `briebug` to test how the schematic runs inside the sandbox-app. Changing this script should require changes to the sandbox-app and understanding of the consequences.
185
+
The test command expects an entity name of `briebug` to test how the schematic runs inside the sandbox-app. Changing this script should require changes to the sandbox-app and understanding of the consequences.
0 commit comments