-
-
Notifications
You must be signed in to change notification settings - Fork 12
2. Enable @ngrx store devtools
Michael Hladky edited this page Sep 21, 2017
·
1 revision
Preconditions:
- Download the Redux DevTools Extension for your browser and install it. In this example i ues Chrome as my browser.
- After installing and restarting the browser you should see a small icon in the top right corner of your browser header.
like this:
- On click it opens a menu where you have several options visible. Click on the Open Remote DevTools option. Now you should see a window like this.
- After the installing and testing to open DevTools in our browser we can start to implement it in our application.
- One last step to do is to install the @ngrx/dev-tools over npm and persist it to the package.json file.
npm install --save @ngrx/store-devtools
- Setup StoreDevtoolsModule in app module
// app/app.module.ts
...
import {StoreDevtoolsModule} from '@ngrx/store-devtools';
export interface IDB {}
...
const reducer = {}
@NgModule({
...
imports: [
...
StoreDevtoolsModule.instrument({
maxAge: 10 // Buffers the last 10 states
})
]
})
export class AppModule {
}
Now you should see the history of state changes in you dev tools.