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


TypeScript store-log-monitor.useLogMonitor函數代碼示例

本文整理匯總了TypeScript中@ngrx/store-log-monitor.useLogMonitor函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript useLogMonitor函數的具體用法?TypeScript useLogMonitor怎麽用?TypeScript useLogMonitor使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了useLogMonitor函數的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: instrumentOptions

export function instrumentOptions() {
  return {
    monitor: useLogMonitor({ visible: true, position: 'right' })
  };
}
開發者ID:mnitdeed,項目名稱:angular2-nativescript-auth0,代碼行數:5,代碼來源:app.module.ts

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

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

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


注:本文中的@ngrx/store-log-monitor.useLogMonitor函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。