StoreModule.forRoot
The storeModule. forRoot method registers global providers needed for access the Store throughout your application.
Example:
@NgModule({
declarations: [
AppComponent,
UnlessDirective,
RainbowDirective,
ReactFormComponent,
FocusDirective
],
imports: [
BrowserModule,
AppRoutingModule,
ExampleModule,
CommonModule,
StoreModule.forRoot({}),
EffectsModule.forRoot([AppEffects]),
//FormsModule,
HttpClientModule,
FormsModule,
BrowserAnimationsModule,
ReactiveFormsModule
],
exports:[FocusDirective],
Copy the code
Storemodule.forfeature (‘ Example ‘, reducers) runtime data structure
In the core. Found in js R3Injector. InjectorDefTypes:
InjectorDefTypes is a set, and look at entries in it:
For more of Jerry’s original articles, please follow the public account “Wang Zixi “: