• This repository has been archived on 28/Jul/2018
  • Stars
    star
    327
  • Rank 123,925 (Top 3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Developer Tools for @ngrx/store

This repository is for version 3.x of of @ngrx/store-devtools.

Click here for the latest version (4.x)


@ngrx/store-devtools

Devtools for @ngrx/store.

Join the chat at https://gitter.im/ngrx/store

Installation

npm install @ngrx/[email protected] --save

Instrumentation

Instrumentation with the Chrome / Firefox Extension (Preferred)

  1. Download the Redux Devtools Extension

  2. In your root Angular module import StoreDevtoolsModule.instrumentOnlyWithExtension():

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

@NgModule({
  imports: [
    StoreModule.provideStore(rootReducer),
    // Note that you must instrument after importing StoreModule
    StoreDevtoolsModule.instrumentOnlyWithExtension({
      maxAge: 5
    })
  ]
})
export class AppModule { }

Instrumentation with a Custom Monitor

To instrument @ngrx/store and use the devtools with a custom monitor you will need to setup the instrumentation providers using instrumentStore():

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

@NgModule({
  imports: [
    StoreModule.provideStore(rootReducer),
    // Note that you must instrument after importing StoreModule
    StoreDevtoolsModule.instrumentStore({
      maxAge: 5,
      monitor: monitorReducer
    })
  ]
})
export class AppModule { }

See @ngrx/store-log-monitor for an example monitor built for Angular 2

Contributing

Please read contributing guidelines here.

More Repositories