当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript store-devtools.StoreDevtoolsModule类代码示例

本文整理汇总了TypeScript中@ngrx/store-devtools.StoreDevtoolsModule的典型用法代码示例。如果您正苦于以下问题:TypeScript StoreDevtoolsModule类的具体用法?TypeScript StoreDevtoolsModule怎么用?TypeScript StoreDevtoolsModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了StoreDevtoolsModule类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       BrowserModule,
       StoreModule.forRoot({ routerReducer }),
       EffectsModule.forRoot([ IdentityEffects ]),
       StoreDevtoolsModule.instrument({ maxAge: 50 }),
       BrowserAnimationsModule,
       FormsModule,
       CoreModule.forRoot([
         { provide: WindowService, useFactory: (win) },
         { provide: ConsoleService, useFactory: (cons) },
         { provide: LogTarget, useFactory: (consoleLogTarget), deps: [ ConsoleService ], multi: true },
       ]),
       RouterModule.forRoot(routes),
       MultilingualModule.forRoot(TEST_MULTILINGUAL_PROVIDERS),
       SampleModule,
       DialogModule,
       IdentityModule,
       StoreRouterConnectingModule,
       StoreModule.forFeature('sidebar', sidebarReducer),
       StoreModule.forFeature('toolbar', toolbarReducer),
       MATERIAL_MODULES,
       FlexLayoutModule,
       PLUGIN_MODULES,
     ],
     declarations: [
       AppComponent,
     ],
     providers: [
       { provide: APP_BASE_HREF, useValue: '/' },
     ],
   }).compileComponents();
 }));
开发者ID:our-city-app,项目名称:gae-plugin-framework,代码行数:34,代码来源:app.component.spec.ts

示例2: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [
       HttpModule,
       JsonpModule,
       StoreModule.provideStore(reducer),
       StoreDevtoolsModule.instrumentOnlyWithExtension(),
     ],
     providers: [AutocompleteService]
   });
 });
开发者ID:collinx,项目名称:susper.com,代码行数:11,代码来源:autocomplete.service.spec.ts

示例3: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       RouterTestingModule,
       BrowserModule,
       CommonModule,
       FormsModule,
       HttpModule,
       InfiniteScrollModule,
       JsonpModule,
       ChartsModule,
       StoreModule.provideStore(reducer),
       StoreDevtoolsModule.instrumentOnlyWithExtension()
     ],
     declarations: [
       AppComponent,
       NavbarComponent,
       IndexComponent,
       ResultsComponent,
       NotFoundComponent,
       AdvancedsearchComponent,
       SearchBarComponent,
       FooterNavbarComponent,
       AboutComponent,
       ContactComponent,
       ModalComponent,
       InfoboxComponent,
       RelatedSearchComponent,
       AutoCompleteComponent,
       ThemeComponent,
       DropdownComponent,
       IntelligenceComponent,
       SpeechtotextComponent,
       AutoCorrectComponent,
       StatsboxComponent
     ],
     providers: [
       SearchService,
       KnowledgeapiService,
       AutocompleteService,
       ThemeService,
       SpeechService,
       IntelligenceService,
       AutocorrectService,
       SpeechSynthesisService
     ]
   })
     .compileComponents();
 }));
开发者ID:collinx,项目名称:susper.com,代码行数:49,代码来源:results.component.spec.ts

示例4: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       RouterTestingModule,
       BrowserModule,
       CommonModule,
       FormsModule,
       HttpModule,
       JsonpModule,
       StoreModule.provideStore(reducer),
       StoreDevtoolsModule.instrumentOnlyWithExtension(),
     ],
     declarations: [
       FooterNavbarComponent,
       IntelligenceComponent,
       SearchsettingsComponent
     ],
   })
   .compileComponents();
 }));
开发者ID:collinx,项目名称:susper.com,代码行数:20,代码来源:searchsettings.component.spec.ts

示例5: beforeEach

 beforeEach(async(() => {
       TestBed.configureTestingModule({
           imports: [
             RouterTestingModule,
             BrowserModule,
             CommonModule,
             FormsModule,
             HttpModule,
             JsonpModule,
             StoreModule.provideStore(reducer),
             StoreDevtoolsModule.instrumentOnlyWithExtension(),
           ],
           declarations: [
             AutoCorrectComponent,
             IntelligenceComponent
           ],
           providers: [
             AutocorrectService ]
       })
         .compileComponents();
     }));
开发者ID:collinx,项目名称:susper.com,代码行数:21,代码来源:auto-correct.component.spec.ts

示例6: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       RouterTestingModule,
       BrowserModule,
       CommonModule,
       FormsModule,
       HttpModule,
       JsonpModule,
       StoreModule.provideStore(reducer),
       StoreDevtoolsModule.instrumentOnlyWithExtension(),
     ],
     declarations: [
       AppComponent,
       SpeechtotextComponent,
       RelatedSearchComponent
     ],
     providers: [
       KnowledgeapiService
     ],
   })
   .compileComponents();
 }));
开发者ID:collinx,项目名称:susper.com,代码行数:23,代码来源:related-search.component.spec.ts

示例7:

import {user} from './user';
import {languages} from './languages';
import {NgModule} from '@angular/core';
import {StoreModule} from '@ngrx/store';
import {Language} from '../../languages/language';
import {routerReducer, StoreRouterConnectingModule} from '@ngrx/router-store';
import {StoreDevtoolsModule} from '@ngrx/store-devtools';
import {environment} from '../../../environments/environment';

export interface AppState {
  user: string;
  languages: Language[];
}

const reducers = {user, languages, routerReducer};
const optionalImports = [];
if (!environment.production) {
  optionalImports.push(StoreDevtoolsModule.instrument());
}

@NgModule({
  imports: [
    StoreModule.forRoot(reducers),
    StoreRouterConnectingModule,
    ...optionalImports
  ]
})
export class CoreStoreModule {
}
开发者ID:harti2006,项目名称:spring-boot-angular2-scaffold,代码行数:29,代码来源:index.ts

示例8:

import { StoreRouterConnectingModule } from '@ngrx/router-store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';

import { EffectsModuleImport } from './effects.imports';
import { StoreModuleImport } from './store.imports';
import { ENV } from '../shared/Env';

export { StoreModuleImport } from './store.imports';
export { EffectsModuleImport } from './effects.imports';

export const BaseImports = [
  StoreModuleImport,
  EffectsModuleImport,
  StoreRouterConnectingModule,
  (ENV !== 'production') ? StoreDevtoolsModule.instrument({ maxAge: 10 }) : []
];
开发者ID:atSistemas,项目名称:angular-base,代码行数:16,代码来源:index.ts

示例9: reducer

import { StoreModule, combineReducers } from '@ngrx/store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { Reducers } from './reducers';

export function reducer(state: any, action: any) {
  return combineReducers(Reducers)(state, action);
}

const store = [
  StoreModule.provideStore(reducer),
]

if (__DEV__) {
  store.push(StoreDevtoolsModule.instrumentOnlyWithExtension())
}

export const STORE = store;
开发者ID:pinkasey,项目名称:activegan,代码行数:17,代码来源:store.ts

示例10: combineReducers

const productionReducer: ActionReducer<IAppState> = combineReducers(reducers);
const developmentReducer: ActionReducer<IAppState> = compose(storeFreeze, combineReducers)(reducers);

export function reducer(state: IAppState, action: Action) {
  if (environment.production) {
    return productionReducer(state, action);
  } else {
    return developmentReducer(state, action);
  }
}

@NgModule()
export class DummyModule {

  static forRoot(): ModuleWithProviders {
    return {
      ngModule: CommonModule
    };
  }
}

export const store: ModuleWithProviders = StoreModule.provideStore(reducer);
export const instrumentation: ModuleWithProviders =
  (!environment.production) ? StoreDevtoolsModule.instrumentOnlyWithExtension() : DummyModule.forRoot();

export const effects: ModuleWithProviders[] = [
  EffectsModule.run(ProfileEffects),
  EffectsModule.run(FeedEffects)
];
开发者ID:venki143mca,项目名称:TeamBirthday,代码行数:29,代码来源:index.ts


注:本文中的@ngrx/store-devtools.StoreDevtoolsModule类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。