How can we make this import one liner?

Viewed 37
imports: [
    CommonModule,
    UiCommonsModule,
    AdminRoutingModule,
    EffectsModule.forFeature([JobListEffect]),
    StoreModule.forFeature('job', jobTrackingListReducerMap),
    EffectsModule.forFeature([RoleManagementEffect]),
    StoreModule.forFeature('roleManagement', roleManagementReducerMap),
  ]

I want to make this EffectsModule and StoreModule in one line.

for effect I can do this:-

EffectsModule.forFeature([JobListEffect,RoleManagementEffect]),

What to do for store?

StoreModule.forFeature('job', jobTrackingListReducerMap),
StoreModule.forFeature('roleManagement', roleManagementReducerMap),
1 Answers

According to the docs, StoreModule.forFeature has 3 overloads and none of them take multiple features as an argument. So you can't do what you are trying to do with StoreModule.forFeature

Related