从商店清除NGRX状态

时间:2019-04-09 11:37:20

标签: angular ngrx

我的应用程序中有一个功能缩减器:-

fromCompnay = {
  list:listReducer,
  growth:growthReducer
}

fromEmployee = {
  list:listReducer,
  growth:growthReducer
}

StoreModule.forFeature('company',fromCompany);
StoreModule.forFeature('employee',fromEmployee);

重置这些减速器的状态是一种干净的方法。

1 个答案:

答案 0 :(得分:0)

可能通过meta-reducer,请参见下文

enter image description here