Skip to content

Commit 0f57274

Browse files
authored
Merge pull request tomalaforge#491 from jdegand/ngrx-note-comments
docs: ngrx notification comments
2 parents d01b52c + b5eefff commit 0f57274

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

apps/ngrx/notification/src/app/app.actions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createActionGroup, emptyProps } from '@ngrx/store';
22

3+
// This is the global actions.
34
export const appActions = createActionGroup({
45
source: 'App Component',
56
events: {

apps/ngrx/notification/src/app/data-access/notification.service.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ export class NotificationService {
3131
);
3232
}
3333
if (isSchool(notification)) {
34-
// SchoolStore is not providedin root. thus at initialization, SchoolStore is undefined
35-
// Option 1: set SchoolStore in root, but we don't want this to separate our class.
36-
// Option 2: your turn
34+
// SchoolStore is a ComponentStore. We can't dispatch a school action here.
35+
// We are stuck. We must have done something wrong and need to refactor...
3736
}
3837
});
3938
}

apps/ngrx/notification/src/app/school/school.store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class SchoolStore
3535
this.httpService.getAllSchools().pipe(
3636
tapResponse(
3737
(schools) => this.patchState({ schools }),
38-
(_) => _,
38+
(_) => _, // not handling the error
3939
),
4040
),
4141
),

0 commit comments

Comments
 (0)