Skip to content
Angular Essentials
GitHub

NgRx store-devtools

One more thing before we do the actual coding. Install devtools

ng add @ngrx/store-devtools@latest

Store Devtools provides developer tools and instrumentation for Store.

Also, install devtools in your browser from here. Choose the appropriate link for your browser from readme.

In your AppModule add instrumentation to the module imports using StoreDevtoolsModule.instrument:

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    AppRoutingModule,
    StoreModule.forRoot({}, {}),
    // Instrumentation must be imported after importing StoreModule (config is optional)
    StoreDevtoolsModule.instrument({
      maxAge: 25, // Retains last 25 states
      logOnly: environment.production, // Restrict extension to log-only mode
      autoPause: true, // Pauses recording actions and state changes when the extension window is not open
    }),
    BrowserAnimationsModule,
    TodoModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {
}