本文整理汇总了TypeScript中@ngrx/store-devtools.instrumentStore函数的典型用法代码示例。如果您正苦于以下问题:TypeScript instrumentStore函数的具体用法?TypeScript instrumentStore怎么用?TypeScript instrumentStore使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了instrumentStore函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: main
export function main(initialHmrState?: any): Promise<any> {
return bootstrap(App, [
// To add more vendor providers please look in the platform/ folder
...PLATFORM_PROVIDERS,
...ENV_PROVIDERS,
...APP_PROVIDERS,
instrumentStore({
monitor: useLogMonitor({
visible: true,
position: 'right'
})
}),
provideStore({})
])
.then(decorateComponentRef)
.catch(err => console.error(err));
}
开发者ID:Denhai,项目名称:angular2-webpack-starter,代码行数:19,代码来源:main.browser.ts
示例2: enableProdMode
import { provideStore } from '@ngrx/store'
import { instrumentStore } from '@ngrx/store-devtools'
import { useLogMonitor } from '@ngrx/store-log-monitor'
import { runEffects } from '@ngrx/effects'
import { AppComponent, environment } from './app/'
import { giphy as reducer } from './app/reducers/giphy'
import { GiphyEffects } from './app/effects/giphy'
import services from './app/services/index'
import { GiphyActions } from './app/actions/giphy'
if (environment.production) {
enableProdMode()
}
bootstrap(AppComponent, [
provideStore({ giphy: reducer }),
runEffects([ GiphyEffects ]),
services,
[GiphyActions],
instrumentStore({
monitor: useLogMonitor({
visible: true,
position: 'right'
})
})
])
开发者ID:guumaster,项目名称:giphy-angular2-ngrx,代码行数:29,代码来源:main.ts
示例3: provideDB
* Override the default location strategy with `HashLocationStrategy`
*/
{ provide: LocationStrategy, useClass: HashLocationStrategy },
/**
* provideDB sets up @ngrx/db with the provided schema and makes the Database
* service everywhere.
*/
provideDB(schema),
/**
* instrumentStore() sets up the @ngrx/store-devtools providers
*/
instrumentStore({
monitor: useLogMonitor({
position: 'right',
visible: true
})
}),
/**
* Finall we provide additional services and action creators so they can
* be used by all of our components, effects, and guards.
*/
services,
actions,
guards,
disableDeprecatedForms(),
provideForms()
]);
开发者ID:Ammatech,项目名称:example-app,代码行数:31,代码来源:main.browser.ts
示例4: useLogMonitor
import {Provider} from '@angular/core';
import {provideStore} from '@ngrx/store';
import {instrumentStore} from '@ngrx/store-devtools';
import {useLogMonitor} from '@ngrx/store-log-monitor';
// Reducers
import {counterReducer} from '../counter/counter.reducer';
export interface AppState {
counter: number;
}
export const STORE_PROVIDERS: Provider[] = [
...provideStore(
{
counter: counterReducer
}, {
counter: 55
}
),
...instrumentStore({
monitor: useLogMonitor({
// Default log monitor options
position: 'bottom',
visible: false,
size: 0.3
})
}),
];
开发者ID:attilacsanyi,项目名称:angular2-minimal,代码行数:29,代码来源:states.ts
示例5: disableDeprecatedForms
import { provideStore } from '@ngrx/store';
import { peopleReducer } from './app/reducers/peopleReducer';
import { partyFilter } from './app/reducers/partyFilterReducer';
import { instrumentStore } from '@ngrx/store-devtools';
import { useLogMonitor } from '@ngrx/store-log-monitor';
import { disableDeprecatedForms, provideForms } from '@angular/forms';
import "angular2-materialize";
let providers = [
disableDeprecatedForms(),
provideForms(),
provideStore({people: peopleReducer, partyFilter: partyFilter})
];
if (environment.production) {
enableProdMode();
}
if (!environment.production) {
providers.push(instrumentStore({
monitor: useLogMonitor({
visible: false,
position: 'bottom'
})
}));
}
bootstrap(AppComponent, providers).catch((e) => {
console.log(e);
}) ;
开发者ID:Pitmov,项目名称:PartyPlanner,代码行数:30,代码来源:main.ts
示例6: bootstrap
import {bootstrap} from "@angular/platform-browser-dynamic";
import {HashLocationStrategy, LocationStrategy, APP_BASE_HREF} from "@angular/common";
import "rxjs/add/operator/do";
import {store} from "./common/store";
import {HTTP_PROVIDERS} from "@angular/http";
import {instrumentStore} from "@ngrx/store-devtools";
import {provideStore} from "@ngrx/store";
import {useLogMonitor} from "@ngrx/store-log-monitor";
import {AppRoutes} from "./common/routes";
import {provideRouter} from "@angular/router";
import {provideForms} from "@angular/forms";
import {AuthenticatedGuard} from "./common/authenticated.guard";
bootstrap(WineCellarApp, [
provideRouter(AppRoutes),
HTTP_PROVIDERS,
{provide: APP_BASE_HREF, useValue: "/"},
{provide: LocationStrategy, useClass: HashLocationStrategy},
provideForms(),
provideStore(store),
AuthenticatedGuard,
instrumentStore({
monitor: useLogMonitor({
visible: false,
position: "right"
})
}),
])
.catch((err: any) => console.error(err));
开发者ID:appcoreopc,项目名称:winecellar,代码行数:30,代码来源:index.ts
示例7: nativeScriptBootstrap
import {nativeScriptBootstrap} from "nativescript-angular/application";
import {AppComponent} from "./app.component";
import {provideStore} from '@ngrx/store';
global.window = {};
import {instrumentStore} from '@ngrx/store-devtools';
global.window = undefined;
import {board} from './board';
import "rxjs/add/operator/do";
// const actionLog: Middleware = action => {
// return action.do(val => {
// console.log('DISPATCHED ACTION: ' + JSON.stringify(val));
// });
// };
// const stateLog: Middleware = state => {
// return state.do(val => {
// console.log('NEW STATE: ' + JSON.stringify(val));
// });
// };
// instrumentStore();
nativeScriptBootstrap(AppComponent, [
provideStore({ board }),
// usePreMiddleware(actionLog),
// usePostMiddleware(stateLog),
instrumentStore()
]);
开发者ID:vakrilov,项目名称:ns-ngrx-tic-tac-toe,代码行数:30,代码来源:main.ts
注:本文中的@ngrx/store-devtools.instrumentStore函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论