File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed 
apps/ngrx/notification/src/app Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import  {  createActionGroup ,  emptyProps  }  from  '@ngrx/store' ; 
22
3+ // This is the global actions. 
34export  const  appActions  =  createActionGroup ( { 
45 source : 'App Component' , 
56 events : { 
Original file line number Diff line number Diff 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 } 
Original file line number Diff line number Diff 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 ) , 
                         You can’t perform that action at this time. 
           
                  
0 commit comments