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


TypeScript store.provideStore函数代码示例

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


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

示例1: bootstrap

import 'zone.js';
import 'reflect-metadata';
import {bootstrap} from 'angular2/platform/browser';
import {App} from './app';
import {provideStore} from '@ngrx/store';
import {APP_REDUCERS} from './reducers/reducers';
import {APP_ACTIONS} from './actions/actions';



bootstrap(App, [
  ELEMENT_PROBE_PROVIDERS,
  APP_ACTIONS,
  provideStore(APP_REDUCERS)
]);
开发者ID:justdaft,项目名称:super-duper-guacamole,代码行数:15,代码来源:main.ts

示例2: provideStore

import {routerReducer, routerMiddleware, RouterState} from 'ngrx-store-router';

// app
import {nameListReducer} from './services/name-list.service';
import {MULTILINGUAL_PROVIDERS, MultilingualStateI, multilingualReducer} from '../i18n.framework/index';
import { PeopleService } from './services/person.service';
import { LineChartDirective } from './services/lineChart.service';

// state definition
export interface AppStoreI {
  router: RouterState;
  i18n: MultilingualStateI;
  names: Array<string>;
};

export const APP_PROVIDERS: any[] = [
  MULTILINGUAL_PROVIDERS,
  provideStore({ 
    router: routerReducer, 
    i18n: multilingualReducer,
    names: nameListReducer
  }),
  routerMiddleware
];

// services
export * from './services/app-config.service';
export * from './services/person.service';
export * from './services/lineChart.service';
export * from './services/name-list.service';
开发者ID:justdaft,项目名称:check-my-chart,代码行数:30,代码来源:index.ts

示例3: bootstrap

import {bootstrap} from '@angular/platform-browser-dynamic';
import {HTTP_PROVIDERS} from '@angular/http';
import {provideRouter} from '@ngrx/router';
import {provideStore} from '@ngrx/store';
import {AppComponent} from './app.component';
import {routesConfig} from './routes.config';
import {ApiService} from './common/api.service';
import {locations} from './common/reducers/locations';
import {issues} from './common/reducers/issues';
import {customers} from './common/reducers/customers';

bootstrap(AppComponent, [
    HTTP_PROVIDERS,
    ApiService,
    provideStore({locations, issues, customers}),
    provideRouter(routesConfig)
]);
开发者ID:flauc,项目名称:udacityCorporateDashboard,代码行数:17,代码来源:main.ts

示例4: provideStore

// libs
import {provideStore} from '@ngrx/store';

// app
import {nameListReducer} from './services/name-list.service';
import {fromHttpListReducer} from './services/from-http.service'
import {MULTILINGUAL_PROVIDERS, MultilingualStateI, multilingualReducer} from '../i18n.framework/index';

// state definition
export interface AppStoreI {
  i18n: MultilingualStateI;
  names: Array<string>;
  adverts: Array<string>;
};

export const APP_PROVIDERS: any[] = [
  MULTILINGUAL_PROVIDERS,
  provideStore({ 
    i18n: multilingualReducer,
    names: nameListReducer,
    adverts: fromHttpListReducer
  })
];

// services
export * from './services/app-config.service';
export * from './services/name-list.service';
export * from './services/from-http.service';

开发者ID:Bohmaster,项目名称:angular2-nativescript-redux,代码行数:28,代码来源:index.ts

示例5: provideStore

// App
export * from './app.component';
export * from './app.service';

import {provideStore} from '@ngrx/store';
import {notesReducer, selectedNoteReducer} from './notes/notesReducers';
import {NoteService} from './notes/NoteService';
import {toast2} from './toast2/toast2';
import {Toast2Service} from './toast2/Toast2Service';
import {ApiHttp} from './util/ApiHttp';
import {auth} from './auth/reducers/auth';
import {AuthService} from './auth/AuthService';
import {spinner} from './util/Spinner.ts';
import {SpinnerService} from './util/Spinner';

import {AppState} from './app.service';

// Application wide providers
export const APP_PROVIDERS = [
  AppState,
  Toast2Service,
  SpinnerService,
  ApiHttp,
  AuthService,
  NoteService,
  provideStore({toast2, spinner, auth, notesReducer, selectedNoteReducer})
];
开发者ID:dannylagrouw,项目名称:trivento-angular2-seed,代码行数:27,代码来源:index.ts

示例6: provideStore

 t.bep(() => {
   return [
     provideStore({names: nameListReducer}),
     NameListService
   ];
 });
开发者ID:QuinntyneBrown,项目名称:angular2-seed-advanced,代码行数:6,代码来源:name-list.service.spec.ts

示例7: provideStore

import { provideStore } from '@ngrx/store';

import { people } from '../_people/reducers/people.reducer';
import { auth } from '../_auth/reducers/auth.reducer';
import { entities } from './entities.reducer';
import { errors } from './errors.reducer';
import { notifications } from './notifications.reducer';

export const APP_REDUCERS_PROVIDER = provideStore({
  auth,
  people,
  entities,
  errors,
  notifications
});
开发者ID:Lukinos,项目名称:ngrx-example,代码行数:15,代码来源:reducers.ts

示例8: provide

// libs
import {Angulartics2} from 'angulartics2';
import {Angulartics2Segment} from 'angulartics2/src/providers/angulartics2-segment';
import {provideStore} from '@ngrx/store';
import {TranslateService} from 'ng2-translate/ng2-translate';

// app
import {ConsoleService, LogService} from '../core.framework/index';
import {AnalyticsService} from '../analytics.framework/index';
import {AppConfigService} from '../app.framework/index';
import {MultilingualService, multilingualReducer} from '../i18n.framework/index';
import {NSAngulartics2Segment} from './services/ns-angulartics2-segment.service';
import {NSLogService} from './services/ns-log.service';
// custom i18n language support
MultilingualService.SUPPORTED_LANGUAGES = AppConfigService.SUPPORTED_LANGUAGES;

export const NS_APP_PROVIDERS: any[] = [
  HTTP_PROVIDERS,
  provide(ConsoleService, { useValue: console }),
  provide(LogService, { useClass: NSLogService }),
  provideStore({  
    i18n: multilingualReducer, 
  }),
  Angulartics2,
  provide(Angulartics2Segment, { useClass: NSAngulartics2Segment }),
  AnalyticsService,
  TranslateService,
  MultilingualService
];
开发者ID:castle-dev,项目名称:ng2-seed-test,代码行数:29,代码来源:index.ts

示例9: bootstrap

import { bootstrap } from '@angular/platform-browser-dynamic' ;
import { AppComponent } from './app.component' ;

import { editorReducer } from './editor/editor.service' ;
import { provideStore } from '@ngrx/store' ; 

bootstrap(AppComponent, [
    provideStore({ editor: editorReducer })
]) ;
开发者ID:enceladus-jp,项目名称:ng2-store,代码行数:9,代码来源:main.ts

示例10: beforeEachProviders

 beforeEachProviders(() => [
   TeacherService,
   provideStore(REDUCERS)
 ]);
开发者ID:bryant-pham,项目名称:brograder,代码行数:4,代码来源:teacher.service.spec.ts


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