NgRx Store Module

    0

    0

    lucycodes42

    Angular snippets for TypeScript

    Here, the code imports the StoreModule, the EffectsModule, and the StoreDevtoolsModule. The store module is then exported. The environment variable is an array of modules that the application should load. The production environment loads the StoreDevtoolsModule.

    Library: angular

    Shortcut: a_ngrx_store_module

    import { NgModule } from '@angular/core';
    import { EffectsModule } from '@ngrx/effects';
    import { StoreModule } from '@ngrx/store';
    import { StoreDevtoolsModule } from '@ngrx/store-devtools';
    import { environment } from '../../environments/environment';
    
    @NgModule({
      imports: [
        StoreModule.forRoot({}),
        EffectsModule.forRoot([]),
        environment.production ? [] : StoreDevtoolsModule.instrument()
      ]
    })
    export class StoreModule {}
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.