How to use the @ngrx/store.StoreModule.provideStore function in @ngrx/store

To help you get started, we’ve selected a few @ngrx/store examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hggeorgiev / ngx-redux-app / src / app / app.module.ts View on Github external
declarations: [

    AppComponent,
    NewOperation,
    OperationsList,
    Currencies,
    CustomCurrencyPipe
  ],
  imports: [ // import Angular's modules
    NgbModule,
    BrowserModule,
    CommonModule,
    FormsModule,
    HttpModule,
    EffectsModule.run(CurrencyEffects),
    StoreModule.provideStore(reducer),


  ],
  providers: [CurrencyService]
})
export class AppModule {
  constructor() {}



}
github jpush / jchat-web / src / app / app.module.ts View on Github external
import { RoomEffect } from './pages/room/effects';
import { MainCanActivate } from './services/common';
import { TipModalModule } from './components/tip-modal';
import { HMR } from '../config/hmr';
import { routing } from './app.router';
import { AppComponent } from './app.component';
import { StorageService, PreloadService, ApiService, SignatureService } from './services/common';
import '../assets/css/common.scss';

@NgModule({
    imports: [
        BrowserModule,
        FormsModule,
        HttpModule,
        routing,
        StoreModule.provideStore({
            appReducer,
            loginReducer,
            registerReducer,
            mainReducer,
            chatReducer,
            contactReducer,
            roomReducer
        }),
        EffectsModule.run(LoginEffect),
        EffectsModule.run(RegisterEffect),
        EffectsModule.run(MainEffect),
        EffectsModule.run(ChatEffect),
        EffectsModule.run(ContactEffect),
        EffectsModule.run(RoomEffect),
        TipModalModule
        // 是否启用ngrx调试工具
github fossasia / susper.com / src / app / services / intelligence.service.spec.ts View on Github external
beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [
        HttpModule,
        JsonpModule,
        StoreModule.provideStore(reducer),
        StoreDevtoolsModule.instrumentOnlyWithExtension(),
      ],
      providers: [IntelligenceService]
    });
  });
github JimTheMan / Jims-Ngrx-Example / jims-ngrx-eg / src / app / state-management / reducers / main-reducer.spec.ts View on Github external
beforeEach(async(() => {
    TestBed.configureTestingModule({
        declarations: [],
        imports: [StoreModule.provideStore({mainReducer})]
      })
      .compileComponents();
  }));
github apache / ambari-logsearch / ambari-logsearch-web / src / app / components / audit-logs-table / audit-logs-table.component.spec.ts View on Github external
ComponentLabelPipe,
        RepoLabelPipe,
        AuditLogFieldLabelPipe,
        AuditLogsTableComponent,
        PaginationComponent,
        DropdownListComponent,
        HostNamePipe
      ],
      imports: [
        RouterTestingModule,
        FormsModule,
        ReactiveFormsModule,
        MomentModule,
        MomentTimezoneModule,
        ...TranslationModules,
        StoreModule.provideStore({
          auditLogs,
          serviceLogs,
          auditLogsFields,
          auditLogsGraphData,
          serviceLogsFields,
          serviceLogsHistogramData,
          serviceLogsTruncated,
          appState,
          appSettings,
          tabs,
          clusters,
          components,
          hosts,
          auth: auth.reducer,
          userSettings
        }),
github fossasia / susper.com / src / app / services / autocomplete.service.spec.ts View on Github external
beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [
        HttpModule,
        JsonpModule,
        StoreModule.provideStore(reducer),
        StoreDevtoolsModule.instrumentOnlyWithExtension(),
      ],
      providers: [AutocompleteService]
    });
  });
github joaoflf / remote-config-dashboard / src / app / app.module.ts View on Github external
import { AddToggleModalComponent } from './add-toggle-modal/add-toggle-modal.component';

@NgModule({
  declarations: [
    AppComponent,
    FeatureTogglesComponent,
    ConfigPropertiesComponent,
    FilterPipe,
    AddToggleModalComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    ClarityModule.forChild(),
    StoreModule.provideStore({featureToggles, properties, apps, app}),
    StoreDevtoolsModule.instrumentOnlyWithExtension({
      maxAge: 5
    }),
    ReactiveFormsModule,
    BrowserAnimationsModule,
    EffectsModule.run(AppsEffects),
    EffectsModule.run(AppEffects)
  ],
  providers: [FilterPipe],
  bootstrap: [AppComponent],
  schemas: [
    CUSTOM_ELEMENTS_SCHEMA
],
})
export class AppModule { }
github OasisDigital / angular-enterprise-example / applications / admin / src / app / app.module.ts View on Github external
},
  {
    path: 'emp-man',
    loadChildren: '@oasisdigital/employee-management#EmployeeManagementModule'
  }
];

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    HttpModule,
    RouterModule.forRoot(ROUTES, { useHash: true }),
    StoreModule.provideStore(reducer),
    StoreDevtoolsModule.instrumentOnlyWithExtension({ maxAge: 10 }),
    DashboardModule,
    FruitBasketModule
  ],
  providers: [AppService],
  bootstrap: [AppComponent]
})
export class AppModule { }
github sean-perkins / nativescript-petfinder / app / app.module.ts View on Github external
import { NativeScriptHttpModule } from 'nativescript-angular/http';

registerElement('Carousel', () => require('nativescript-carousel').Carousel);
registerElement('CarouselItem', () => require('nativescript-carousel').CarouselItem);

@NgModule({
    bootstrap: [
        AppComponent
    ],
    imports: [
        NativeScriptModule,
        NativeScriptHttpModule,
        AppRoutingModule,
        AppStoreModule,
        NavigationModule,
        StoreModule.provideStore(AppReducer),
    ],
    declarations: [
        AppComponent,
    ],
    providers: [
        { provide: NgModuleFactoryLoader, useClass: NSModuleFactoryLoader },
    ],
    schemas: [
        NO_ERRORS_SCHEMA
    ]
})
export class AppModule { }
github apache / ambari-logsearch / ambari-logsearch-web / src / app / components / date-picker / date-picker.component.spec.ts View on Github external
beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [DatePickerComponent],
      imports: [
        StoreModule.provideStore({
          appSettings,
          userSettings: userSettings.reducer
        })
      ],
      providers: [
        AppSettingsService,
        UserSettingsService
      ]
    })
    .compileComponents();
  }));