ngrx / store-devtools

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

fix(devtools): Fixed AOT bug when providing devtools config options #52

Closed brandonroberts closed 7 years ago

brandonroberts commented 7 years ago

Also exposed the configuration options to the instrumentOnlyWithExtension method Docs also updated to reflect usage of maxAge with extension

Closes #48, #51

born2net commented 7 years ago

tx for the fix, so do we use it like before or there is new syntax?

brandonroberts commented 7 years ago

@born2net no new syntax, you can use it the same way as before.

born2net commented 7 years ago

great tx

MikeRyanDev commented 7 years ago

Published as v3.2.3

IT-Ideas commented 7 years ago

Hello!

It seems the same issue occurs with @ngrx/store-log-monitor as StoreDevtoolsModule.instrumentStore({ monitor: useLogMonitor({ visible: true, position: 'right' }) }), in the imports of the app module generates the same kind of error.

Could it be?

Thx

brandonroberts commented 7 years ago

@IT-Ideas in order to use @ngrx/store-log-monitor you need to provide a function that returns the config

export function instrumentOptions() {
  return {
    monitor: useLogMonitor({ visible: true, position: 'right' })
  };
}

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    StoreDevtoolsModule.instrumentStore(instrumentOptions)
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {}
IT-Ideas commented 7 years ago

@brandonroberts Thank you, it works!

I created Pull request in @ngrx/store-log-monitor with the readme.md updated accordingly.

born2net commented 7 years ago

Where is the definition of: useLogMonitor({ visible: true, position: 'right' })

Angular 2 Kitchen sink: http://ng2.javascriptninja.io and source@ https://github.com/born2net/Angular-kitchen-sink Regards,

Sean

IT-Ideas commented 7 years ago

@born2net right here

born2net commented 7 years ago

tx!