Wednesday, April 5, 2017

[ngrx] Monitor state with store-devtools

 Angular    ngrx/store    store-devtools  


▌Introduction


ngrx/store-devtools is used for monitoring the state of ngrx/store.


▌Environment

l   ngrx/store 5.2.0
l   ngrx/effects 5.2.0
l   ngrx/store-devtools 5.2.0



▌Steps


▋Install browser extension

Visit http://extension.remotedev.io/#installation to download and install the extension.

▋Configuration

Open app.module.ts and add the following settings.


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

@NgModule({
imports: [
StoreDevtoolsModule.instrument({
maxAge: 10, // Retains last 10 states
logOnly: environment.production // Restrict extension to log-only mode
})
],
})
export class AppModule { }




▋Demo



▌Reference



No comments:

Post a Comment