ngrx / store-devtools

Developer Tools for @ngrx/store
MIT License
326 stars 38 forks source link

add to docs instrumentOnlyWithExtension with support for AOT #51

Closed born2net closed 7 years ago

born2net commented 7 years ago

Add to docs instrumentOnlyWithExtension with support for AOT

import { STORE_DEVTOOLS_CONFIG } from '@ngrx/store-devtools/src/config';

export function noMonitor() {
  return null;
}

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    StoreModule.provideStore(rootReducer),
    StoreDevtoolsModule.instrumentOnlyWithExtension()
  ],
  providers: [
    {
      provide: STORE_DEVTOOLS_CONFIG, useValue: {
        maxAge: 20,
        monitor: noMonitor
      }
    }
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
DxCx commented 7 years ago

Hmm,

Im not sure what it should solve, but i could compile AOT using StoreDevtoolsModule.instrumentOnlyWithExtension() but without STORE_DEVTOOLS_CONFIG. however, when opening dev tools extention, i don't see the store.

that's how i got here, but even after adding the provider for STORE_DEVTOOLS_CONFIG as mentioned, i still don't see the store on extentions using dev store extension..

brandonroberts commented 7 years ago

Fixed via https://github.com/ngrx/store-devtools/issues/52