當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript StoreDevtoolsModule.instrumentOnlyWithExtension方法代碼示例

本文整理匯總了TypeScript中@ngrx/store-devtools.StoreDevtoolsModule.instrumentOnlyWithExtension方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript StoreDevtoolsModule.instrumentOnlyWithExtension方法的具體用法?TypeScript StoreDevtoolsModule.instrumentOnlyWithExtension怎麽用?TypeScript StoreDevtoolsModule.instrumentOnlyWithExtension使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在@ngrx/store-devtools.StoreDevtoolsModule的用法示例。


在下文中一共展示了StoreDevtoolsModule.instrumentOnlyWithExtension方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [
       HttpModule,
       JsonpModule,
       StoreModule.provideStore(reducer),
       StoreDevtoolsModule.instrumentOnlyWithExtension(),
     ],
     providers: [AutocompleteService]
   });
 });
開發者ID:collinx,項目名稱:susper.com,代碼行數:11,代碼來源:autocomplete.service.spec.ts

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: combineReducers

  profile: IProfile;
  weather: IWeather;
}

// all new reducers should be define here
const reducers = {
  feed: feedReducer,
  profile: profileReducer,
  weather: weatherReducer
};

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);
  }
}

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

export const effects: ModuleWithProviders[] = [
  EffectsModule.run(ProfileEffects),
  EffectsModule.run(FeedEffects),
  EffectsModule.run(WeatherEffects)
];
開發者ID:akazimirov,項目名稱:domic,代碼行數:30,代碼來源:index.ts

示例8:

interface InternalStateType {
  [key: string]: any;
}

interface StoreType {
  state: InternalStateType;
  rootState: InternalStateType;
  restoreInputValues: () => void;
  disposeOldHosts: () => void;
}

let CONDITIONAL_IMPORTS = [];

if (ENV === 'development') {
  console.log('loading react devtools');
  CONDITIONAL_IMPORTS.push(StoreDevtoolsModule.instrumentOnlyWithExtension());
}

/**
 * `AppModule` is the main entry point into Angular2's bootstraping process
 */
@NgModule({
  bootstrap: [ AppComponent ],
  declarations: [
    AppComponent,
    AboutComponent,
    HomeComponent,
    NoContentComponent,
    XLargeDirective
  ],
  imports: [ // import Angular's modules
開發者ID:greg9504,項目名稱:angular-electron-dream-starter,代碼行數:31,代碼來源:app.module.ts

示例9: registerReducers

import { localStorageSync } from 'ngrx-store-localstorage';

export { EchoesState } from './reducers';
const { actions, reducers } = registerReducers(reducersRegisters);

const composeStore = compose(
  localStorageSync(['videos', 'player', 'nowPlaylist', 'search', 'appLayout'], true),
  combineReducers
)(reducers);

const optionalImports = [];

if ('production' !== ENV) {
    // Note that you must instrument after importing StoreModule
    optionalImports.push(StoreDevtoolsModule.instrumentOnlyWithExtension());
}
@NgModule({
  imports: [
    StoreModule.provideStore(composeStore),
    ...optionalImports
  ],
  declarations: [

  ],
  exports: [

  ],
  providers: [ ...actions ]
})
export class CoreStoreModule {};
開發者ID:xxxxlr,項目名稱:echoes-ng2,代碼行數:30,代碼來源:index.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.instrumentOnlyWithExtension方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。